-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
73 lines (70 loc) · 1.78 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
73 lines (70 loc) · 1.78 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
services:
postgres:
image: postgres:17-alpine
container_name: rantai-billing-db
restart: unless-stopped
environment:
POSTGRES_USER: rantai_billing
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
POSTGRES_DB: rantai_billing
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rantai_billing"]
interval: 5s
timeout: 3s
retries: 5
deploy:
resources:
limits:
memory: 512M
cpus: "1.0"
rust-backend:
image: ${RUST_BACKEND_IMAGE:-rantai-billing-rs:latest}
container_name: rantai-billing-rs
restart: unless-stopped
environment:
DATABASE_URL: postgresql://rantai_billing:${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}@postgres:5432/rantai_billing
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8080/health || exit 1"]
interval: 5s
timeout: 3s
retries: 5
start_period: 5s
deploy:
resources:
limits:
memory: 512M
cpus: "1.0"
app:
image: rantai-billing:latest
container_name: rantai-billing-app
restart: unless-stopped
ports:
- "${APP_PORT:-13300}:3000"
environment:
RUST_BACKEND_URL: http://rust-backend:8080
NODE_ENV: production
env_file:
- .env
depends_on:
rust-backend:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:3000/health || exit 1"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
deploy:
resources:
limits:
memory: 512M
cpus: "1.0"
volumes:
pgdata: