-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.production.yml
More file actions
67 lines (63 loc) · 1.68 KB
/
docker-compose.production.yml
File metadata and controls
67 lines (63 loc) · 1.68 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
# Production override for GameRequest
# Usage: docker compose -f docker-compose.yml -f docker-compose.production.yml up
version: "3.8"
services:
ggrequestz:
restart: always # Stronger restart policy for production
environment:
NODE_ENV: production
PM2_INSTANCES: ${PM2_INSTANCES:-max}
AUTO_MIGRATE: true # Enable auto-migration in production
deploy:
resources:
limits:
memory: 2G
cpus: "2.0"
reservations:
memory: 1G
cpus: "1.0"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
postgres:
restart: always
profiles: [] # Always include in production
environment:
# Production PostgreSQL settings
POSTGRES_SHARED_PRELOAD_LIBRARIES: "pg_stat_statements"
POSTGRES_MAX_CONNECTIONS: 100
POSTGRES_SHARED_BUFFERS: "256MB"
POSTGRES_EFFECTIVE_CACHE_SIZE: "1GB"
POSTGRES_MAINTENANCE_WORK_MEM: "64MB"
deploy:
resources:
limits:
memory: 1G
cpus: "1.0"
reservations:
memory: 512M
cpus: "0.5"
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
redis:
restart: always
profiles: [] # Always include in production
command: redis-server --appendonly yes --maxmemory ${REDIS_MAX_MEMORY:-512mb} --maxmemory-policy allkeys-lru --save 900 1 --save 300 10
deploy:
resources:
limits:
memory: 600M
cpus: "0.5"
reservations:
memory: 256M
cpus: "0.25"
logging:
driver: "json-file"
options:
max-size: "5m"
max-file: "3"