-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
122 lines (116 loc) · 2.66 KB
/
docker-compose.prod.yml
File metadata and controls
122 lines (116 loc) · 2.66 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
# Production configuration
# Usage: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
services:
web:
env_file:
- .env.prod
environment:
NODE_ENV: production
HOSTNAME: "0.0.0.0"
volumes:
- uploads_data:/data/uploads/images
restart: unless-stopped
deploy:
resources:
limits:
cpus: "2"
memory: 768M
reservations:
cpus: "0.5"
memory: 384M
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
system-profiler:
env_file:
- .env.prod
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /:/host/root:ro
- /var/lib/docker:/host/var/lib/docker:ro
restart: unless-stopped
deploy:
resources:
limits:
cpus: "0.5"
memory: 256M
reservations:
cpus: "0.25"
memory: 128M
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8787"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
ai-img-validator:
restart: unless-stopped
deploy:
resources:
limits:
cpus: "2"
memory: 512M
reservations:
cpus: "0.5"
memory: 384M
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8000')",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
db:
env_file:
- .env.prod
ports:
- "127.0.0.1:5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
deploy:
resources:
limits:
cpus: "1"
memory: 512M
reservations:
cpus: "0.25"
memory: 256M
umami:
ports:
- "127.0.0.1:3001:3000"
environment:
DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/umami
APP_SECRET: ${UMAMI_APP_SECRET}
TZ: America/Los_Angeles
restart: unless-stopped
deploy:
resources:
limits:
cpus: "0.5"
memory: 256M
reservations:
cpus: "0.1"
memory: 128M
healthcheck:
test:
["CMD", "wget", "-q", "--spider", "http://localhost:3000/api/heartbeat"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
postgres_data:
name: pi_site_prod_data
uploads_data:
name: pi_site_prod_uploads