Created
September 22, 2020 16:45
-
-
Save Hasnayeen/cdc9d7838b2a92ab81c24618ab2db4dd to your computer and use it in GitHub Desktop.
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
goodwork.local { | |
root * /var/www/public | |
php_fastcgi php:9000 | |
encode gzip | |
file_server | |
log { | |
output file /var/log/access.log | |
} | |
tls internal | |
} | |
goodwork.local:6001 { | |
@websockets { | |
header Connection Upgrade | |
header Upgrade websocket | |
} | |
reverse_proxy @websockets websocket:6001 | |
} |
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: | |
caddy: | |
image: caddy:2.1.1 | |
ports: | |
- 80:80 | |
- 443:443 | |
- 6001:6001 | |
volumes: | |
- ./:/var/www | |
- ./docker/dev/Caddyfile:/etc/caddy/Caddyfile | |
- caddy-data:/data | |
depends_on: | |
- php | |
php: | |
build: | |
context: . | |
dockerfile: docker/dev/php.Dockerfile | |
volumes: | |
- ./:/var/www | |
depends_on: | |
- db | |
db: | |
image: mariadb | |
hostname: db | |
environment: | |
- "MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}" | |
- "MYSQL_DATABASE=${DB_DATABASE}" | |
- "MYSQL_USER=${DB_USERNAME}" | |
- "MYSQL_PASSWORD=${DB_PASSWORD}" | |
volumes: | |
- data-volume:/var/lib/mysql | |
redis: | |
image: redis | |
hostname: redis | |
worker: | |
build: | |
context: . | |
dockerfile: docker/worker.Dockerfile | |
volumes: | |
- ./:/var/www | |
working_dir: /var/www | |
command: bash -c "php artisan queue:work redis --sleep=1 --tries=1" | |
depends_on: | |
- php | |
websocket: | |
build: | |
context: . | |
dockerfile: docker/websocket.Dockerfile | |
volumes: | |
- ./:/var/www | |
working_dir: /var/www | |
command: bash -c "php artisan websockets:serve" | |
depends_on: | |
- php | |
volumes: | |
data-volume: | |
driver: local | |
caddy-data: | |
driver: local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment