Eric Bower
·
20 Nov 24
docker-compose.prod.yml
1version: "3.8"
2services:
3 postgres:
4 env_file:
5 - .env.prod
6 volumes:
7 - ./data/postgres-data:/var/lib/postgresql/data
8 ports:
9 - "5432:5432"
10 command: -N 1024 -B 4096MB
11 minio-caddy:
12 image: ghcr.io/picosh/pico/caddy:latest
13 restart: always
14 env_file:
15 - .env.prod
16 environment:
17 APP_DOMAIN: pico.sh
18 APP_EMAIL: ${MINIO_EMAIL:-hello@pico.sh}
19 volumes:
20 - ${MINIO_CADDYFILE}:/etc/caddy/Caddyfile
21 - ./data/minio-caddy/data:/data
22 - ./data/minio-caddy/config:/config
23 ports:
24 - "80:80"
25 - "443:443"
26 profiles:
27 - db
28 - all
29 minio:
30 env_file:
31 - .env.prod
32 volumes:
33 - ./data/minio-data:/data
34 pipemgr:
35 env_file:
36 - .env.prod
37 volumes:
38 - ./data/pipemgr/data/term_info_ed25519:/key:ro
39 registry:
40 env_file:
41 - .env.prod
42 volumes:
43 - ./imgs/registry.yml:/etc/docker/registry/config.yml
44 networks:
45 - imgs
46 imgproxy:
47 env_file:
48 - .env.prod
49 volumes:
50 - ./data/imgs-storage/data:/storage/imgs
51 - ./data/pgs-storage/data:/storage/pgs
52 pastes-caddy:
53 image: ghcr.io/picosh/pico/caddy:latest
54 restart: always
55 networks:
56 - pastes
57 env_file:
58 - .env.prod
59 environment:
60 APP_DOMAIN: ${PASTES_DOMAIN:-pastes.sh}
61 APP_EMAIL: ${PASTES_EMAIL:-hello@pico.sh}
62 volumes:
63 - ${PASTES_CADDYFILE}:/etc/caddy/Caddyfile
64 - ./data/pastes-caddy/data:/data
65 - ./data/pastes-caddy/config:/config
66 ports:
67 - "${PASTES_HTTPS_V4:-443}:443"
68 - "${PASTES_HTTP_V4:-80}:80"
69 - "${PASTES_HTTPS_V6:-[::1]:443}:443"
70 - "${PASTES_HTTP_V6:-[::1]:80}:80"
71 profiles:
72 - pastes
73 - caddy
74 - all
75 pastes-web:
76 networks:
77 pastes:
78 aliases:
79 - web
80 env_file:
81 - .env.prod
82 volumes:
83 - ./data/pastes-ssh/data:/app/ssh_data
84 pastes-ssh:
85 networks:
86 pastes:
87 aliases:
88 - ssh
89 env_file:
90 - .env.prod
91 volumes:
92 - ./data/pastes-ssh/data:/app/ssh_data
93 ports:
94 - "${PASTES_SSH_V4:-22}:2222"
95 - "${PASTES_SSH_V6:-[::1]:22}:2222"
96 pipe-caddy:
97 image: ghcr.io/picosh/pico/caddy:latest
98 restart: always
99 networks:
100 - pipe
101 env_file:
102 - .env.prod
103 environment:
104 APP_DOMAIN: ${PIPE_DOMAIN:-pipe.pico.sh}
105 APP_EMAIL: ${PIPE_EMAIL:-hello@pico.sh}
106 volumes:
107 - ${PIPE_CADDYFILE}:/etc/caddy/Caddyfile
108 - ./data/pipe-caddy/data:/data
109 - ./data/pipe-caddy/config:/config
110 ports:
111 - "${PIPE_HTTPS_V4:-443}:443"
112 - "${PIPE_HTTP_V4:-80}:80"
113 - "${PIPE_HTTPS_V6:-[::1]:443}:443"
114 - "${PIPE_HTTP_V6:-[::1]:80}:80"
115 profiles:
116 - pipe
117 - caddy
118 - all
119 pipe-web:
120 networks:
121 pipe:
122 aliases:
123 - web
124 env_file:
125 - .env.prod
126 volumes:
127 - ./data/pipe-ssh/data:/app/ssh_data
128 pipe-ssh:
129 networks:
130 pipe:
131 aliases:
132 - ssh
133 env_file:
134 - .env.prod
135 volumes:
136 - ./data/pipe-ssh/data:/app/ssh_data
137 ports:
138 - "${PIPE_SSH_V4:-22}:2222"
139 - "${PIPE_SSH_V6:-[::1]:22}:2222"
140 prose-caddy:
141 image: ghcr.io/picosh/pico/caddy:latest
142 restart: always
143 networks:
144 - prose
145 env_file:
146 - .env.prod
147 environment:
148 APP_DOMAIN: ${PROSE_DOMAIN:-prose.sh}
149 APP_EMAIL: ${PROSE_EMAIL:-hello@pico.sh}
150 volumes:
151 - ${PROSE_CADDYFILE}:/etc/caddy/Caddyfile
152 - ./data/prose-caddy/data:/data
153 - ./data/prose-caddy/config:/config
154 labels:
155 pipemgr.enable: true
156 depends_on:
157 pipemgr:
158 condition: service_healthy
159 ports:
160 - "${PROSE_HTTPS_V4:-443}:443"
161 - "${PROSE_HTTP_V4:-80}:80"
162 - "${PROSE_HTTPS_V6:-[::1]:443}:443"
163 - "${PROSE_HTTP_V6:-[::1]:80}:80"
164 profiles:
165 - prose
166 - caddy
167 - all
168 prose-web:
169 networks:
170 prose:
171 aliases:
172 - web
173 env_file:
174 - .env.prod
175 volumes:
176 - ./data/prose-ssh/data:/app/ssh_data
177 prose-ssh:
178 networks:
179 prose:
180 aliases:
181 - ssh
182 env_file:
183 - .env.prod
184 volumes:
185 - ./data/prose-ssh/data:/app/ssh_data
186 ports:
187 - "${PROSE_SSH_V4:-22}:2222"
188 - "${PROSE_SSH_V6:-[::1]:22}:2222"
189 imgs-caddy:
190 image: ghcr.io/picosh/pico/caddy:latest
191 restart: always
192 networks:
193 - imgs
194 env_file:
195 - .env.prod
196 environment:
197 APP_DOMAIN: ${IMGS_DOMAIN:-imgs.sh}
198 APP_EMAIL: ${IMGS_EMAIL:-hello@pico.sh}
199 volumes:
200 - ${IMGS_CADDYFILE}:/etc/caddy/Caddyfile
201 - ./data/imgs-caddy/data:/data
202 - ./data/imgs-caddy/config:/config
203 ports:
204 - "${IMGS_HTTPS_V4:-443}:443"
205 - "${IMGS_HTTP_V4:-80}:80"
206 - "${IMGS_HTTPS_V6:-[::1]:443}:443"
207 - "${IMGS_HTTP_V6:-[::1]:80}:80"
208 profiles:
209 - imgs
210 - caddy
211 - all
212 imgs-web:
213 networks:
214 imgs:
215 aliases:
216 - web
217 env_file:
218 - .env.prod
219 volumes:
220 - ./data/storage/data:/app/.storage
221 - ./data/imgs-ssh/data:/app/ssh_data
222 imgs-ssh:
223 networks:
224 imgs:
225 aliases:
226 - ssh
227 env_file:
228 - .env.prod
229 volumes:
230 - ./data/storage/data:/app/.storage
231 - ./data/imgs-ssh/data:/app/ssh_data
232 - ./data/imgs-tmp:/tmp
233 ports:
234 - "${IMGS_SSH_V4:-22}:2222"
235 - "${IMGS_SSH_V6:-[::1]:22}:2222"
236 pgs-caddy:
237 image: ghcr.io/picosh/pico/caddy:latest
238 restart: always
239 networks:
240 - pgs
241 env_file:
242 - .env.prod
243 environment:
244 APP_DOMAIN: ${PGS_DOMAIN:-pgs.sh}
245 APP_EMAIL: ${PGS_EMAIL:-hello@pico.sh}
246 volumes:
247 - ${PGS_CADDYFILE}:/etc/caddy/Caddyfile
248 - ./data/pgs-caddy/data:/data
249 - ./data/pgs-caddy/config:/config
250 ports:
251 - "${PGS_HTTPS_V4:-443}:443"
252 - "${PGS_HTTP_V4:-80}:80"
253 - "${PGS_HTTPS_V6:-[::1]:443}:443"
254 - "${PGS_HTTP_V6:-[::1]:80}:80"
255 labels:
256 pipemgr.enable: true
257 depends_on:
258 pipemgr:
259 condition: service_healthy
260 profiles:
261 - pgs
262 - caddy
263 - all
264 pgs-web:
265 networks:
266 pgs:
267 aliases:
268 - web
269 env_file:
270 - .env.prod
271 volumes:
272 - ./data/storage/data:/app/.storage
273 - ./data/pgs-ssh/data:/app/ssh_data
274 pgs-ssh:
275 networks:
276 pgs:
277 aliases:
278 - ssh
279 env_file:
280 - .env.prod
281 volumes:
282 - ./data/storage/data:/app/.storage
283 - ./data/pgs-ssh/data:/app/ssh_data
284 - ./data/tmp:/tmp
285 ports:
286 - "${PGS_SSH_V4:-22}:2222"
287 - "${PGS_SSH_V6:-[::1]:22}:2222"
288 deploy:
289 resources:
290 limits:
291 memory: 3g
292 feeds-caddy:
293 image: ghcr.io/picosh/pico/caddy:latest
294 restart: always
295 networks:
296 - feeds
297 env_file:
298 - .env.prod
299 environment:
300 APP_DOMAIN: ${FEEDS_DOMAIN:-feeds.pico.sh}
301 APP_EMAIL: ${FEEDS_EMAIL:-hello@pico.sh}
302 volumes:
303 - ${FEEDS_CADDYFILE}:/etc/caddy/Caddyfile
304 - ./data/feeds-caddy/data:/data
305 - ./data/feeds-caddy/config:/config
306 ports:
307 - "${FEEDS_HTTPS_V4:-443}:443"
308 - "${FEEDS_HTTP_V4:-80}:80"
309 - "${FEEDS_HTTPS_V6:-[::1]:443}:443"
310 - "${FEEDS_HTTP_V6:-[::1]:80}:80"
311 profiles:
312 - feeds
313 - caddy
314 - all
315 feeds-web:
316 networks:
317 feeds:
318 aliases:
319 - web
320 env_file:
321 - .env.prod
322 volumes:
323 - ./data/feeds-ssh/data:/app/ssh_data
324 feeds-ssh:
325 networks:
326 feeds:
327 aliases:
328 - ssh
329 env_file:
330 - .env.prod
331 volumes:
332 - ./data/feeds-ssh/data:/app/ssh_data
333 ports:
334 - "${FEEDS_SSH_V4:-22}:2222"
335 - "${FEEDS_SSH_V6:-[::1]:22}:2222"
336 pico-caddy:
337 image: ghcr.io/picosh/pico/caddy:latest
338 restart: always
339 networks:
340 - pico
341 env_file:
342 - .env.prod
343 environment:
344 APP_DOMAIN: ${PICO_DOMAIN:-pico.sh}
345 APP_EMAIL: ${PICO_EMAIL:-hello@pico.sh}
346 volumes:
347 - ${PICO_CADDYFILE}:/etc/caddy/Caddyfile
348 - ./data/pico-caddy/data:/data
349 - ./data/pico-caddy/config:/config
350 ports:
351 - "${PICO_HTTPS_V4:-443}:443"
352 - "${PICO_HTTP_V4:-80}:80"
353 - "${PICO_HTTPS_V6:-[::1]:443}:443"
354 - "${PICO_HTTP_V6:-[::1]:80}:80"
355 profiles:
356 - pico
357 - caddy
358 - all
359 pico-ssh:
360 networks:
361 pico:
362 aliases:
363 - ssh
364 env_file:
365 - .env.prod
366 volumes:
367 - ./data/pico-ssh/data:/app/ssh_data
368 ports:
369 - "${PICO_SSH_V4:-22}:2222"
370 - "${PICO_SSH_V6:-[::1]:22}:2222"
371
372networks:
373 default:
374 ipam:
375 driver: default
376 config:
377 - subnet: "172.101.0.0/24"
378 prose:
379 driver_opts:
380 com.docker.network.bridge.name: prose
381 ipam:
382 config:
383 - subnet: 172.18.0.0/16
384 pastes:
385 driver_opts:
386 com.docker.network.bridge.name: pastes
387 ipam:
388 config:
389 - subnet: 172.19.0.0/16
390 imgs:
391 driver_opts:
392 com.docker.network.bridge.name: imgs
393 ipam:
394 config:
395 - subnet: 172.21.0.0/16
396 feeds:
397 driver_opts:
398 com.docker.network.bridge.name: feeds
399 ipam:
400 config:
401 - subnet: 172.22.0.0/16
402 pgs:
403 driver_opts:
404 com.docker.network.bridge.name: pgs
405 ipam:
406 config:
407 - subnet: 172.23.0.0/16
408 pico:
409 driver_opts:
410 com.docker.network.bridge.name: pico
411 ipam:
412 config:
413 - subnet: 172.25.0.0/16
414 pipe:
415 driver_opts:
416 com.docker.network.bridge.name: pipe
417 ipam:
418 config:
419 - subnet: 172.27.0.0/16