Last active
November 28, 2017 23:32
-
-
Save bretanac93/828b82bcbce05855926737a6aa1491f5 to your computer and use it in GitHub Desktop.
Docker compose file for Deploying PHP Applications
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
version: '3' | |
services: | |
php: | |
image: php:fpm | |
volumes: | |
- ./code:/code | |
web: | |
image: nginx | |
ports: | |
- "8080:80" | |
volumes: | |
- ./code:/code | |
- ./nginx/app.conf:/etc/nginx/conf.d/app.conf | |
- ./server_logs:/var/log/nginx | |
environment: | |
- DB_HOST=db | |
- DB_PORT=3306 | |
- DB_DATABASE=the_db | |
- DB_USERNAME=root | |
- DB_PASSWORD=TheMegaPassword | |
db: | |
image: mysql | |
environment: | |
- MYSQL_ROOT_PASSWORD=TheMegaPassword | |
- MYSQL_DATABASE=the_db | |
volumes: | |
- ./db_data:/var/lib/mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment