Created
February 6, 2017 16:43
-
-
Save jlamim/fc77e38c24786935f6b6dedf8a606945 to your computer and use it in GitHub Desktop.
Docker Compose - CodeIgniter + Docker - Tutorial 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I use ENV variables to name my containers and set the ports | |
# to change, replate it here or in .env file | |
version: '2' | |
services: | |
php: | |
container_name: ${APP_NAME}-php | |
image: jlamim/php7-nginx | |
volumes: | |
- ./src:/var/www/src | |
links: | |
- database | |
ports: | |
- ${HTTP_PORT}:80 | |
- ${HTTPS_PORT}:443 | |
database: | |
container_name: ${APP_NAME}-database | |
image: mysql:5.7 | |
environment: | |
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} | |
MYSQL_DATABASE: ${MYSQL_DATABASE} | |
MYSQL_USER: ${MYSQL_USER} | |
MYSQL_PASSWORD: ${MYSQL_PASSWORD} | |
volumes: | |
- ./data:/var/lib/mysql | |
ports: | |
- ${MYSQL_PORT}:3306 | |
volumes: | |
data: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment