Created
November 27, 2016 07:37
-
-
Save g0ld3lux/8d7e5aaf812f028c2a289e65073274a5 to your computer and use it in GitHub Desktop.
Scaling Out Laravel with Docker
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
haproxy: | |
image: interaction/haproxy:master | |
links: | |
- letsencrypt | |
- web | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes_from: | |
- letsencrypt | |
environment: | |
- BALANCE=source | |
web: | |
build: ./web | |
environment: | |
- VIRTUAL_HOST=*,https://* | |
- FORCE_SSL=yes | |
volumes: | |
- ./web/config/conf.d:/etc/nginx/conf.d | |
- ./web/config/sites-enabled:/etc/nginx/sites-enabled | |
- ../:/var/www/laravel/ | |
links: | |
- db | |
- cache | |
db: | |
image: mysql:5.7 | |
volumes: | |
- ./data/mysql:/var/lib/mysql | |
restart: always | |
ports: | |
- "3306:3306" | |
environment: | |
MYSQL_DATABASE: homestead | |
MYSQL_USER: homestead | |
MYSQL_PASSWORD: secret | |
MYSQL_ROOT_PASSWORD: root | |
cache: | |
image: redis:alpine | |
command: redis-server --requirepass redis --appendonly yes | |
volumes: | |
- ./data/redis:/data | |
restart: always | |
ports: | |
- "6379:6379" | |
letsencrypt: | |
image: interaction/letsencrypt:master | |
environment: | |
- DOMAINS=scalingout.dev,www.scalingout.dev; | |
- [email protected] | |
- OPTIONS=--test-cert | |
expose: | |
- "80" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment