-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (83 loc) · 1.8 KB
/
Copy pathdocker-compose.yml
File metadata and controls
86 lines (83 loc) · 1.8 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
services:
arclane:
build: .
container_name: arclane
ports:
- "127.0.0.1:8012:8012"
env_file: .env
depends_on:
postgres:
condition: service_healthy
networks:
- default
- webproxy
- backend
restart: unless-stopped
deploy:
resources:
limits:
memory: 2g
cpus: "2.0"
reservations:
memory: 512m
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8012/health"]
interval: 30s
timeout: 5s
retries: 3
logging:
driver: json-file
options:
max-size: "20m"
max-file: "5"
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-arclane}
POSTGRES_USER: ${POSTGRES_USER:-arclane}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me}
command:
- "postgres"
- "-c"
- "shared_buffers=256MB"
- "-c"
- "work_mem=8MB"
- "-c"
- "effective_cache_size=768MB"
- "-c"
- "maintenance_work_mem=128MB"
- "-c"
- "wal_buffers=16MB"
- "-c"
- "max_connections=100"
- "-c"
- "log_min_duration_statement=500"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
deploy:
resources:
limits:
memory: 1g
cpus: "1.0"
reservations:
memory: 256m
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-arclane} -d ${POSTGRES_DB:-arclane}"]
interval: 10s
timeout: 5s
retries: 5
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
networks:
webproxy:
external: true
name: deployment_shandor_net
backend:
external: true
name: backend
volumes:
postgres_data: