-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yml
70 lines (63 loc) · 1.3 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
version: '3'
services:
caddy:
image: caddy:2.1.1
ports:
- "${APP_PORT}:443"
volumes:
- ./:/var/www
- ./docker/dev/Caddyfile:/etc/caddy/Caddyfile
- caddy-data:/data
depends_on:
- php
restart: unless-stopped
php:
build:
context: .
dockerfile: docker/prod/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
restart: always
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
restart: always
websocket:
build:
context: .
dockerfile: docker/websocket.Dockerfile
ports:
- "6001:6001"
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