-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.local.yml
293 lines (283 loc) · 8.55 KB
/
docker-compose.local.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
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
version: "3.7"
services:
laravel:
image: xoren-io-laravel
container_name: xoren-io-laravel-local
build:
context: .
dockerfile: ./laravel/Dockerfile
args:
APP_ENV: "${APP_ENV:-local}"
APP_USER: "${APP_USER:-laravel}"
APP_USER_UUID: ${APP_USER_UUID:-1000}
APP_USER_GUID: ${APP_USER_GUID:-1000}
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
working_dir: /var/www
env_file: ./.env.local
environment:
CONTAINER_ROLE: "laravel"
APP_ENV: "${APP_ENV:-local}"
APP_USER: "${APP_USER:-laravel}"
APP_USER_UUID: ${APP_USER_UUID:-1000}
APP_USER_GUID: ${APP_USER_GUID:-1000}
SWOOLE_MAX_REQUESTS: ${SWOOLE_MAX_REQUESTS:-500}
SWOOLE_TASK_WORKERS: ${SWOOLE_TASK_WORKERS:-auto}
SWOOLE_WATCH: ${SWOOLE_WATCH:-false}
SWOOLE_WORKERS: ${SWOOLE_WORKERS:-auto}
SWOOLE_PORT: ${SWOOLE_PORT:-8000}
XDEBUG_MODE: 'off'
XDEBUG_CONFIG: 'client_host=host.docker.internal'
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
volumes:
- /.env.local:/var/www/.env
- /etc/timezone:/etc/timezone:ro
# - /etc/localtime:/etc/localtime:ro
- /etc/default/locale:/etc/default/locale:ro
- /etc/locale.gen:/etc/locale.gen:ro
- ./laravel:/var/www
- ./php/php-ini-overrides.ini:/usr/local/etc/php/php.ini
networks:
- DOCKER_BRIDGE
depends_on:
- redis
- websocket
ports:
- ${SWOOLE_PORT:-8000}:${SWOOLE_PORT:-8000}
schedule:
image: xoren-io-schedule
container_name: xoren-io-schedule-local
build:
context: .
dockerfile: ./laravel/Dockerfile
args:
APP_ENV: ${APP_ENV:-local}
working_dir: /var/www
env_file: ./.env.local
environment:
CONTAINER_ROLE: 'schedule'
XDEBUG_MODE: 'off'
XDEBUG_CONFIG: 'client_host=host.docker.internal'
volumes:
- /.env.local:/var/www/.env
- /etc/timezone:/etc/timezone:ro
# - /etc/localtime:/etc/localtime:ro
- /etc/default/locale:/etc/default/locale:ro
- /etc/locale.gen:/etc/locale.gen:ro
- ./laravel:/var/www
- ./php/php-ini-overrides.ini:/usr/local/etc/php/php.ini
networks:
- DOCKER_BRIDGE
depends_on:
- laravel
queue:
image: xoren-io-queue
container_name: xoren-io-queue-local
build:
context: .
dockerfile: ./laravel/Dockerfile
args:
APP_ENV: "${APP_ENV:-local}"
APP_USER: "${APP_USER:-laravel}"
APP_USER_UUID: ${APP_USER_UUID:-1000}
APP_USER_GUID: ${APP_USER_GUID:-1000}
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
working_dir: /var/www
env_file: ./.env.local
environment:
CONTAINER_ROLE: "queue"
APP_ENV: "${APP_ENV:-local}"
APP_USER: "${APP_USER:-laravel}"
XDEBUG_MODE: 'off'
XDEBUG_CONFIG: 'client_host=host.docker.internal'
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
volumes:
- /.env.local:/var/www/.env
- /etc/timezone:/etc/timezone:ro
# - /etc/localtime:/etc/localtime:ro
- /etc/default/locale:/etc/default/locale:ro
- /etc/locale.gen:/etc/locale.gen:ro
- ./laravel:/var/www
- ./php/php-ini-overrides.ini:/usr/local/etc/php/php.ini
networks:
- DOCKER_BRIDGE
depends_on:
- laravel
queue_high:
image: xoren-io-queue-high
container_name: xoren-io-queue-high-local
build:
context: .
dockerfile: ./laravel/Dockerfile
args:
APP_ENV: "${APP_ENV:-local}"
APP_USER: "${APP_USER:-laravel}"
APP_USER_UUID: ${APP_USER_UUID:-1000}
APP_USER_GUID: ${APP_USER_GUID:-1000}
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
working_dir: /var/www
env_file: ./.env.local
environment:
CONTAINER_ROLE: 'queue_high'
APP_ENV: "${APP_ENV:-local}"
APP_USER: "${APP_USER:-laravel}"
XDEBUG_MODE: 'off'
XDEBUG_CONFIG: 'client_host=host.docker.internal'
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
volumes:
- /.env.local:/var/www/.env
- /etc/timezone:/etc/timezone:ro
# - /etc/localtime:/etc/localtime:ro
- /etc/default/locale:/etc/default/locale:ro
- /etc/locale.gen:/etc/locale.gen:ro
- ./laravel:/var/www
- ./php/php-ini-overrides.ini:/usr/local/etc/php/php.ini
networks:
- DOCKER_BRIDGE
depends_on:
- laravel
websocket:
image: xoren-io-websocket
container_name: xoren-io-websocket-local
build:
context: ./soketi
dockerfile: Dockerfile
args:
APP_ENV: ${APP_ENV:-local}
APP_TIMEZONE: ${APP_TIMEZONE:-Europe/London}
APP_ENCODE: ${APP_ENCODE:-en_GB}
env_file: ./.env.local
environment:
DEFAULT_APP_ID: ${PUSHER_APP_ID:-app-id}
DEFAULT_APP_KEY: ${PUSHER_APP_KEY:-app-key}
DEFALT_APP_SECRET: ${PUSHER_APP_SECRET:-app-secret}
DEBUG: 'true'
SOKETI_DEBUG: '1'
METRICS_SERVER_PORT: '9601'
DB_REDIS_HOST: redis
DB_REDIS_PORT: 6379
DB_REDIS_DB: 3
CORS_ALLOW_HEADERS: "*"
CORS_ALLOWHEADERS: "*"
CORS_METHODS: "*"
CORS_ORIGIN: "*"
CORS_CREDENTIALS: "true"
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
ports:
- '${SOKETI_PORT:-6001}:6001'
- '${SOKETI_METRICS_SERVER_PORT:-9601}:9601'
networks:
- DOCKER_BRIDGE
nginx:
image: xoren-io-nginx
container_name: xoren-io-nginx-local
working_dir: /var/www
env_file: ./.env.local
build:
context: .
dockerfile: ./nginx/Dockerfile
args:
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
environment:
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
SWOOLE_PORT: ${SWOOLE_PORT:-8000}
volumes:
- /etc/timezone:/etc/timezone:ro
# - /etc/localtime:/etc/localtime:ro
- /etc/default/locale:/etc/default/locale:ro
- /etc/locale.gen:/etc/locale.gen:ro
- ~/pems/dhparam.pem:/etc/nginx/dhparam.pem
- ~/pems/ssl-cert-snakeoil.key:/etc/ssl/private/ssl-cert-snakeoil.key
- ~/pems/ssl-cert-snakeoil.pem:/etc/ssl/certs/ssl-cert-snakeoil.pem
- ./laravel/public:/var/www/public
- ./laravel/storage:/var/www/storage
ports:
- 80:80
- 443:443
networks:
- DOCKER_BRIDGE
mysql:
image: xoren-io-mysql
container_name: xoren-io-mysql-local
env_file: ./.env
build:
context: ./mysql
dockerfile: Dockerfile
args:
MYSQL_VERSION: ${MYSQL_VERSION:-8}
APP_ENV: "${APP_ENV:-local}"
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${LANG:-en_GB}"
cap_add:
- SYS_NICE
ports:
- "${FORWARD_DB_PORT:-3306}:3306"
environment:
MYSQL_DATABASE: "${DB_DATABASE:-laravel}"
MYSQL_USER: "${DB_USERNAME:-laravel}"
MYSQL_PASSWORD: "${DB_PASSWORD:-password}"
MYSQL_ROOT_PASSWORD: "${DB_PASSWORD:-password}"
MYSQL_ROOT_HOST: '%'
MYSQL_ALLOW_EMPTY_PASSWORD: ${MYSQL_ALLOW_EMPTY_PASSWORD:-1}
INIT_ROCKSDB: ${INIT_ROCKSDB:-1}
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
volumes:
- /etc/timezone:/etc/timezone:ro
# - /etc/localtime:/etc/localtime:ro
- /etc/default/locale:/etc/default/locale:ro
- /etc/locale.gen:/etc/locale.gen:ro
- 'MYSQL_VOLUME:/var/lib/mysql'
networks:
- DOCKER_BRIDGE
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"]
retries: 3
timeout: 5s
redis:
image: xoren-io-redis
container_name: xoren-io-redis-local
build:
context: ./redis
dockerfile: Dockerfile
args:
APP_ENV: "${APP_ENV:-local}"
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${LANG:-en_GB}"
env_file: ./.env
environment:
TZ: "${APP_TIMEZONE:-Europe/London}"
LANG: "${APP_ENCODE:-en_GB}"
# # Add the sysctl setting
# sysctls:
# - vm.overcommit_memory=1
volumes:
- /etc/timezone:/etc/timezone:ro
# - /etc/localtime:/etc/localtime:ro
- /etc/default/locale:/etc/default/locale:ro
- /etc/locale.gen:/etc/locale.gen:ro
- 'REDIS_VOLUME:/data'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
networks:
- DOCKER_BRIDGE
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
networks:
DOCKER_BRIDGE:
driver: bridge
volumes:
MYSQL_VOLUME:
driver: local
REDIS_VOLUME:
driver: local