Created
January 1, 2018 22:59
-
-
Save sigaocaue/dc1341edbcda0a0e27ccd88d6e2a32c6 to your computer and use it in GitHub Desktop.
O docker-compose utilizado em aplicações PHP.
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
# v3 syntax | |
version: '3' | |
# Named volumes | |
volumes: | |
# Mysql Data | |
change_me-mysql-data: | |
driver: local | |
services: | |
# PHP (nginx) | |
api: | |
image: ambientum/php:latest-nginx | |
container_name: change_me-nginx | |
volumes: | |
- .:/var/www/app | |
ports: | |
- "8000:8080" | |
links: | |
- mysql | |
# Mysql (5.7) | |
mysql: | |
image: ambientum/mysql:5.7 | |
container_name: change_me-mysql | |
volumes: | |
- change_me-mysql-data:/var/lib/mysql | |
ports: | |
- "3307:3306" | |
environment: | |
- MYSQL_ROOT_PASSWORD=root | |
- MYSQL_DATABASE=change_me | |
- MYSQL_USER=change_me | |
- MYSQL_PASSWORD=secret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment