-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathdocker-compose.yml
241 lines (237 loc) · 5.31 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
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
version: '3.8'
services:
prod:
build:
context: .
target: prod
networks:
clist_network:
ipv4_address: 172.42.0.102
volumes:
- static_files:/usr/src/clist/staticfiles/
- media_files:/usr/src/clist/mediafiles/
- shared_files:/usr/src/clist/sharedfiles/
- ./logs/production:/usr/src/clist/logs/
- ./legacy/logs/:/usr/src/clist/logs/legacy/
- ./logs/postgres/:/usr/src/clist/logs/postgres/
depends_on:
- db
- memcached
secrets:
- db_conf
- sentry_conf
restart: unless-stopped
dev:
build:
context: .
target: dev
networks:
clist_network:
ipv4_address: 172.42.0.103
volumes:
- ./src/:/usr/src/clist/
- ./legacy/api/:/usr/src/clist/legacy/api/
- ./src/static:/usr/src/clist/staticfiles/
- media_files:/usr/src/clist/mediafiles/
- shared_files:/usr/src/clist/sharedfiles/
- ./logs/development:/usr/src/clist/logs/
- ./legacy/logs/:/usr/src/clist/logs/legacy/
depends_on:
- db
secrets:
- db_conf
- sentry_conf
ports:
- ${CLIST_DEV_PORT:-10042}:10042
restart: unless-stopped
memcached:
image: memcached
networks:
- clist_network
restart: unless-stopped
legacy:
build: ./legacy
networks:
clist_network:
ipv4_address: 172.42.0.104
volumes:
- ./legacy:/usr/src/legacy/
- shared_files:/sharedfiles/
depends_on:
- db
secrets:
- db_conf
- sentry_conf
restart: unless-stopped
pgadmin:
image: dpage/pgadmin4:latest
networks:
- clist_network
volumes:
- pgadmin_data:/var/lib/pgadmin
env_file:
- ./.env.db
depends_on:
- db
restart: unless-stopped
db:
build:
context: .
target: postgres
networks:
- clist_network
volumes:
- postgres_data:/var/lib/postgresql/data/
- ./src/scripts/:/usr/src/clist/scripts/
- ./logs/postgres/:/var/log/
env_file:
- ./.env.db
shm_size: 4GB
ports:
- ${CLIST_DB_PORT:-5432}:5432
restart: unless-stopped
nginx:
build:
context: .
target: nginx
networks:
clist_network:
ipv4_address: 172.42.0.101
volumes:
- static_files:/staticfiles/
- media_files:/mediafiles/
- ./legacy:/usr/src/legacy/
- ./config/nginx/conf.d:/etc/nginx/conf.d/
- certbot_www:/var/www/certbot/
- certbot_conf:/etc/letsencrypt/
- ./logs/nginx:/var/log/
ports:
- 80:80
- 443:443
restart: unless-stopped
certbot:
image: certbot/certbot:latest
networks:
- clist_network
volumes:
- ./logs/letsencrypt:/var/log/letsencrypt
- certbot_www:/var/www/certbot/
- certbot_conf:/etc/letsencrypt/
depends_on:
- nginx
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 1d & wait $${!}; done;'"
restart: unless-stopped
loggly:
build:
context: .
target: loggly
networks:
- clist_network
volumes:
- ./logs/:/logs/
secrets:
- loggly_token
restart: unless-stopped
netdata:
image: netdata/netdata:latest
networks:
- clist_network
hostname: netdata.clist.by
pid: host
cap_add:
- SYS_PTRACE
- SYS_ADMIN
security_opt:
- apparmor:unconfined
volumes:
- netdata_config:/etc/netdata
- netdata_lib:/var/lib/netdata
- netdata_cache:/var/cache/netdata
- /etc/passwd:/host/etc/passwd:ro
- /etc/group:/host/etc/group:ro
- /etc/localtime:/etc/localtime:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /etc/os-release:/host/etc/os-release:ro
- /var/log:/host/var/log:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
env_file:
- ./.env.netdata
restart: unless-stopped
networks:
clist_network:
driver: bridge
driver_opts:
com.docker.network.bridge.name: br-clist
name: clist
ipam:
config:
- subnet: 172.42.0.0/24
secrets:
db_conf:
file: ./.env.db
sentry_conf:
file: ./.env.sentry
loggly_token:
file: ./config/loggly/.env.token
volumes:
postgres_data:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/postgres_data
pgadmin_data:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/pgadmin
static_files:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/static_files
media_files:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/media_files
certbot_www:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/certbot_www
certbot_conf:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/certbot_conf
netdata_config:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/netdata/config
netdata_lib:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/netdata/lib
netdata_cache:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/netdata/cache
shared_files:
driver: local
driver_opts:
type: none
o: bind
device: ./volumes/shared_files