-
-
Notifications
You must be signed in to change notification settings - Fork 59
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
110 lines (104 loc) · 2.37 KB
/
docker-compose.yml
File metadata and controls
110 lines (104 loc) · 2.37 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
PHP_VERSION: '8.3'
WWWUSER: '${WWWUSER:-1000}'
WWWGROUP: '${WWWGROUP:-1000}'
image: boilerplate-laravel:latest
ports:
- '${APP_PORT:-8000}:80'
environment:
CONTAINER_MODE: http
OCTANE_SERVER: roadrunner
WITH_SCHEDULER: 'true'
WITH_HORIZON: 'false'
RUNNING_MIGRATIONS_AND_SEEDERS: '${RUNNING_MIGRATIONS_AND_SEEDERS:-false}'
env_file:
- .env
volumes:
- storage:/var/www/html/storage/app
- logs:/var/www/html/storage/logs
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
networks:
- appnet
worker:
build:
context: .
dockerfile: Dockerfile
args:
PHP_VERSION: '8.3'
image: boilerplate-laravel:latest
environment:
CONTAINER_MODE: worker
WORKER_COMMAND: 'php /var/www/html/artisan queue:work --sleep=3 --tries=3 --max-time=3600'
env_file:
- .env
volumes:
- storage:/var/www/html/storage/app
- logs:/var/www/html/storage/logs
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
networks:
- appnet
profiles:
- worker
mysql:
image: mysql:8.0
ports:
- '${FORWARD_DB_PORT:-3306}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD:-secret}'
MYSQL_DATABASE: '${DB_DATABASE:-liberu}'
MYSQL_USER: '${DB_USERNAME:-liberu}'
MYSQL_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- mysql:/var/lib/mysql
networks:
- appnet
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- redis:/data
networks:
- appnet
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 10s
timeout: 5s
retries: 5
mailpit:
image: axllent/mailpit:latest
ports:
- '${FORWARD_MAIL_PORT:-1025}:1025'
- '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025'
networks:
- appnet
networks:
appnet:
driver: bridge
volumes:
mysql:
driver: local
redis:
driver: local
storage:
driver: local
logs:
driver: local