-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
94 lines (84 loc) · 2.02 KB
/
docker-compose.prod.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
services:
database:
image: postgres:17.2-alpine3.20
container_name: ${DATABASE_CONTAINER_NAME}
command: >
postgres -c max_connections=1000
-c shared_buffers=256MB
-c effective_cache_size=768MB
-c maintenance_work_mem=64MB
-c checkpoint_completion_target=0.7
-c wal_buffers=16MB
-c default_statistics_target=100
-p ${POSTGRES_PORT}
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
PGDATA: /var/lib/postgresql/data/pgdata/${POSTGRES_DB}
volumes:
- /etc/localtime:/etc/localtime:ro
- DB:/var/lib/postgresql/data/pgdata/
deploy:
resources:
limits:
cpus: '0.50'
memory: 512M
reservations:
cpus: '0.25'
memory: 256M
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 30s
timeout: 10s
retries: 5
networks:
- nion
tty: true
backend:
container_name: ${BACKEND_CONTAINER_NAME}
env_file:
- .env
image: ghcr.io/nikto-iz-niotkyda/backend:latest
depends_on:
- database
deploy:
resources:
limits:
cpus: '0.50'
memory: 512M
volumes:
- /etc/localtime:/etc/localtime:ro
- ./other:/src/other
restart: always
expose:
- ${BACKEND_PORT}:${BACKEND_PORT}
networks:
- nion
tty: true
bot:
container_name: ${BOT_CONTAINER_NAME}
env_file:
- .env
image: ghcr.io/nikto-iz-niotkyda/bot:latest
depends_on:
- database
- backend
deploy:
resources:
limits:
cpus: '0.35'
memory: 512M
volumes:
- /etc/localtime:/etc/localtime:ro
- ./other:/src/other
restart: always
networks:
- nion
tty: true
networks:
nion:
volumes:
DB:
name: ${VOLUME_DATABASE}