Created
March 3, 2019 06:45
-
-
Save byhbt/6db5944cc1e0f2a532c1bfa80436fc71 to your computer and use it in GitHub Desktop.
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: '2' | |
services: | |
# The Application | |
app: | |
build: | |
context: ./ | |
dockerfile: app.dockerfile | |
working_dir: /var/www | |
volumes: | |
- ./repo:/var/www | |
- ./logs/php7.1-fpm:/var/log/php7.1-fpm | |
environment: | |
- "DB_PORT=3306" | |
- "DB_HOST=database" | |
# The Web Server | |
web: | |
build: | |
context: ./ | |
dockerfile: web.dockerfile | |
working_dir: /var/www | |
volumes_from: | |
- app | |
ports: | |
- 8081:80 | |
volumes: | |
- ./logs/nginx:/var/log/nginx | |
# The Database | |
database: | |
image: mysql:5.6 | |
volumes: | |
- dbdata:/var/lib/mysql | |
environment: | |
- "MYSQL_DATABASE=homestead" | |
- "MYSQL_USER=homestead" | |
- "MYSQL_PASSWORD=secret" | |
- "MYSQL_ROOT_PASSWORD=secret" | |
ports: | |
- "33061:3306" | |
volumes: | |
dbdata: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment