-
-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·161 lines (153 loc) · 3.4 KB
/
Copy pathdocker-compose.yml
File metadata and controls
executable file
·161 lines (153 loc) · 3.4 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
services:
app:
build:
context: .
dockerfile: Dockerfile
args:
PHP_VERSION: '8.5'
WWWUSER: '${WWWUSER:-1000}'
WWWGROUP: '${WWWGROUP:-1000}'
image: accounting-laravel:latest
ports:
- '${APP_PORT:-8000}:8000'
environment:
CONTAINER_MODE: http
OCTANE_SERVER: roadrunner
WITH_SCHEDULER: 'true'
WITH_HORIZON: 'false'
WITH_REVERB: '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
horizon:
build:
context: .
dockerfile: Dockerfile
args:
PHP_VERSION: '8.5'
image: accounting-laravel:latest
environment:
CONTAINER_MODE: horizon
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:
- horizon
reverb:
build:
context: .
dockerfile: Dockerfile
args:
PHP_VERSION: '8.5'
image: accounting-laravel:latest
ports:
- '${REVERB_SERVER_PORT:-8080}:8080'
environment:
CONTAINER_MODE: reverb
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:
- reverb
worker:
build:
context: .
dockerfile: Dockerfile
args:
PHP_VERSION: '8.5'
image: accounting-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_accounting}'
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