Repository navigation
Expand file tree
/
Copy pathdocker-compose-nodejs.yml
More file actions
212 lines (212 loc) · 5.62 KB
/
Copy pathdocker-compose-nodejs.yml
File metadata and controls
212 lines (212 loc) · 5.62 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
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
services:
web:
image: nginx:latest
ulimits:
nofile:
soft: 65535
hard: 65535
logging:
driver: json-file
options:
max-size: "50m"
max-file: "5"
env_file: .env
ports:
- "${LHC_PUBLIC_PORT}:80"
volumes:
- ./livehelperchat/lhc_web:/code
- ./conf/nginx/site-nodejs.conf:/etc/nginx/conf.d/default.conf
- ./conf/nginx/mime.types:/etc/nginx/mime.types
- ./conf/nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- db
- php
- php-cronjob
networks:
- code-network
restart: always
php:
build:
context: ./Dockerfiles/php
target: runtime
image: remdex/livehelperchat-php:latest
ulimits:
nofile:
soft: 65535
hard: 65535
logging:
driver: json-file
options:
max-size: "50m"
max-file: "5"
env_file: .env
deploy:
replicas: 1
volumes:
- ./livehelperchat/lhc_web:/code
- ./lhc-php-resque/lhcphpresque:/code/extension/lhcphpresque
- ./NodeJS-Helper/nodejshelper:/code/extension/nodejshelper
- ./conf/scripts:/scripts
- ./conf/php-fpm/zz-lhc.conf:/usr/local/etc/php-fpm.d/zz-lhc.conf
# extra_hosts:
# - "host.docker.internal:host-gateway"
networks:
- code-network
restart: always
cobrowse:
build: ./Dockerfiles/cobrowse
image: remdex/livehelperchat-cobrowse:latest
ulimits:
nofile:
soft: 65535
hard: 65535
logging:
driver: json-file
options:
max-size: "50m"
max-file: "5"
ports:
- 127.0.0.1:31130:31130
networks:
- code-network
restart: always
php-cronjob:
build:
context: ./Dockerfiles/php
target: cronjob
image: remdex/livehelperchat-php-cronjob:latest
ulimits:
nofile:
soft: 65535
hard: 65535
logging:
driver: json-file
options:
max-size: "50m"
max-file: "5"
env_file: .env
volumes:
- ./livehelperchat/lhc_web:/code
- ./lhc-php-resque/lhcphpresque:/code/extension/lhcphpresque
- ./NodeJS-Helper/nodejshelper:/code/extension/nodejshelper
- ./conf/scripts:/scripts
- ./conf/php/cronjob.ini:/usr/local/etc/php/conf.d/zz-lhc.ini
# live crontab - edit on the host, then `docker compose up -d` / restart the container
- ./Dockerfiles/php/cron/cronjob:/etc/cron.d:ro
# extra_hosts:
# - "host.docker.internal:host-gateway"
networks:
- code-network
restart: always
php-resque:
build:
context: ./Dockerfiles/php
target: resque
image: remdex/livehelperchat-php-resque:latest
ulimits:
nofile:
soft: 65535
hard: 65535
logging:
driver: json-file
options:
max-size: "50m"
max-file: "5"
env_file: .env
volumes:
- ./livehelperchat/lhc_web:/code
- ./lhc-php-resque/lhcphpresque:/code/extension/lhcphpresque
- ./NodeJS-Helper/nodejshelper:/code/extension/nodejshelper
- ./conf/scripts:/scripts
- ./.env:/scripts/.env:ro
- ./conf/php/resque.ini:/usr/local/etc/php/conf.d/zz-lhc.ini
# live crontab - edit on the host, then `docker compose up -d` / restart the container
- ./Dockerfiles/php/cron/resque:/etc/cron.d:ro
# extra_hosts:
# - "host.docker.internal:host-gateway"
networks:
- code-network
depends_on:
- db
- redis
restart: always
nodejshelper:
build: ./Dockerfiles/nodejshelper
image: remdex/livehelperchat-nodejshelper:latest
ulimits:
nofile:
soft: 65535
hard: 65535
logging:
driver: json-file
options:
max-size: "50m"
max-file: "5"
env_file: .env
depends_on:
- redis
networks:
- code-network
restart: always
redis:
image: "redis:alpine"
ulimits:
nofile:
soft: 65535
hard: 65535
logging:
driver: json-file
options:
max-size: "50m"
max-file: "5"
# PHP sessions live in Redis (conf/php-fpm/zz-lhc.conf sets
# session.save_handler=redis), so without a persistent ./data every session is
# lost when this container is recreated. Stored on the host in ./redisdata,
# next to ./dbdata. Append-only file keeps at most one fsync window of writes.
# REDIS_APPEND_FSYNC: everysec (Redis default) | always | no - see .env.default.
command:
- "redis-server"
- "--appendonly"
- "yes"
- "--appendfsync"
- "${REDIS_APPEND_FSYNC:-everysec}"
# Upstream default is 0 = refuse to start on a corrupt AOF tail, so one
# unclean shutdown (SIGKILL, power loss, full disk) becomes a crash loop.
# 128 MiB in BYTES (the option takes no unit suffix) truncates the torn
# tail at startup and loses only those commands.
- "--aof-load-corrupt-tail-max-size"
- "${REDIS_AOF_CORRUPT_TAIL_MAX:-134217728}"
# docker stop sends SIGTERM and Redis fsyncs + exits; the default 10s can
# expire first and SIGKILL it mid-write, which is what corrupts the AOF.
stop_grace_period: 1m
volumes:
- ./redisdata:/data
networks:
- code-network
restart: always
db:
image: mariadb
ulimits:
nofile:
soft: 65535
hard: 65535
logging:
driver: json-file
options:
max-size: "50m"
max-file: "5"
env_file: .env
environment:
TZ: UTC
volumes:
- ./dbdata:/var/lib/mysql
ports:
- 127.0.0.1:3307:3306
command:
- "--innodb-buffer-pool-size=256M"
networks:
- code-network
restart: always
networks:
code-network:
driver: bridge