forked from privexlabs/BrandBlitz
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
95 lines (85 loc) · 2.29 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
95 lines (85 loc) · 2.29 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
# Production overrides: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
secrets:
s3_secret_access_key:
external: true # create with: printf '<value>' | docker secret create s3_secret_access_key -
minio_root_password:
external: true # create with: printf '<value>' | docker secret create minio_root_password -
services:
postgres:
restart: unless-stopped
# No exposed port in prod — only internal network access
redis:
restart: unless-stopped
minio:
restart: unless-stopped
command: server /data --console-address ":9001" --certs-dir /certs
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
MINIO_ROOT_PASSWORD_FILE: /run/secrets/minio_root_password
MINIO_OPTS: "--certs-dir /certs"
volumes:
- /etc/minio/certs:/certs:ro
secrets:
- minio_root_password
minio-setup:
restart: "no"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER}
depends_on:
minio:
condition: service_healthy
api:
restart: unless-stopped
environment:
NODE_ENV: production
S3_ENDPOINT: ${S3_ENDPOINT:-https://minio:9000}
S3_SECRET_ACCESS_KEY_FILE: /run/secrets/s3_secret_access_key
S3_SECRET_ACCESS_KEY: ""
secrets:
- s3_secret_access_key
deploy:
replicas: 2
resources:
limits:
memory: 512m
worker:
restart: unless-stopped
environment:
NODE_ENV: production
S3_ENDPOINT: ${S3_ENDPOINT:-https://minio:9000}
S3_SECRET_ACCESS_KEY_FILE: /run/secrets/s3_secret_access_key
S3_SECRET_ACCESS_KEY: ""
secrets:
- s3_secret_access_key
deploy:
replicas: 1
resources:
limits:
memory: 256m
deposit-monitor:
restart: unless-stopped
environment:
NODE_ENV: production
deploy:
replicas: 1
resources:
limits:
memory: 128m
web:
restart: unless-stopped
deploy:
replicas: 2
resources:
limits:
memory: 256m
nginx:
restart: unless-stopped
image: nginx:1.25-alpine
environment:
DOMAIN: ${DOMAIN}
volumes:
- ./nginx/templates/nginx.prod.conf.template:/etc/nginx/templates/default.conf.template:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
ports:
- "80:80"
- "443:443"