Last active
November 19, 2017 01:48
-
-
Save rodrigoSyscop/09bc95a6604ca00cbd62635ae0f33ed3 to your computer and use it in GitHub Desktop.
Ambiente de desenvolvimento Docker com Docker Compose
This file contains hidden or 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
version: "3" | |
services: | |
# Web service layer | |
nginx: | |
image: nginx:1.13 | |
volumes: | |
- "./app:/var/www/html" | |
- "./nginx/nginx.conf:/etc/nginx/nginx.conf" | |
ports: | |
- "80:80" | |
depends_on: | |
- php | |
# Application service layer | |
php: | |
build: | |
context: ./php | |
volumes: | |
- "./app:/var/www/html" | |
ports: | |
- "9000:9000" | |
depends_on: | |
- mysql | |
environment: | |
- MYSQL_USER=root | |
- MYSQL_PASS=123.456 | |
# Data persistence service layer | |
mysql: | |
image: mysql:5.7.20 | |
volumes: | |
- "db_data:/var/lib/mysql" | |
- "./mysql/initial_data:/docker-entrypoint-initdb.d" | |
ports: | |
- "3306:3306" | |
environment: | |
- MYSQL_ROOT_PASSWORD=123.456 | |
volumes: | |
db_data: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment