forked from Cognition-Partner-Workshops/otterworks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.procs.yml
More file actions
83 lines (79 loc) · 2.86 KB
/
Copy pathdocker-compose.procs.yml
File metadata and controls
83 lines (79 loc) · 2.86 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
# Standalone legacy billing stack. This is intentionally separate from the
# Helm/EKS deployment path and models the database-centric before state.
services:
legacy-billing-db:
image: postgres:16
environment:
POSTGRES_DB: billing_${NS:-dev}
POSTGRES_USER: billing
POSTGRES_PASSWORD: ${DB_PASSWORD:-billing}
ports:
- "127.0.0.1:${PROCS_DB_PORT:-55432}:5432"
volumes:
- ./services/legacy-billing/db/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
- ./services/legacy-billing/db/procs/plans.sql:/docker-entrypoint-initdb.d/02-plans.sql:ro
- ./services/legacy-billing/db/procs/rating.sql:/docker-entrypoint-initdb.d/03-rating.sql:ro
- ./services/legacy-billing/db/procs/invoicing.sql:/docker-entrypoint-initdb.d/04-invoicing.sql:ro
- ./services/legacy-billing/db/procs/dunning.sql:/docker-entrypoint-initdb.d/05-dunning.sql:ro
- ./services/legacy-billing/db/seed.sql:/docker-entrypoint-initdb.d/06-seed.sql:ro
- legacy-billing-db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U billing -d billing_${NS:-dev}"]
interval: 3s
timeout: 5s
retries: 20
legacy-billing:
build:
context: ./services/legacy-billing
dockerfile: Dockerfile
depends_on:
legacy-billing-db:
condition: service_healthy
environment:
DB_HOST: legacy-billing-db
DB_PORT: 5432
DB_NAME: billing_${NS:-dev}
DB_USER: billing
DB_PASSWORD: ${DB_PASSWORD:-billing}
ports:
- "127.0.0.1:${PROCS_APP_PORT:-8096}:8096"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8096/health')"]
interval: 5s
timeout: 5s
retries: 12
billing-service:
build:
context: ./services/billing-service
dockerfile: Dockerfile
depends_on:
billing-service-db:
condition: service_healthy
environment:
BILLING_SVC_DATABASE_URL: postgresql://billing_svc:billing_svc@billing-service-db:5432/billing_svc_${NS:-dev}
BILLING_SVC_ALLOW_INTERNAL_RESET: "true"
ports:
- "127.0.0.1:${PROCS_TARGET_PORT:-8097}:8097"
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8097/health')"]
interval: 5s
timeout: 5s
retries: 12
billing-service-db:
image: postgres:16
environment:
POSTGRES_DB: billing_svc_${NS:-dev}
POSTGRES_USER: billing_svc
POSTGRES_PASSWORD: billing_svc
ports:
- "127.0.0.1:${PROCS_TARGET_DB_PORT:-56432}:5432"
volumes:
- billing-service-db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U billing_svc -d billing_svc_${NS:-dev}"]
interval: 3s
timeout: 5s
retries: 20
volumes:
legacy-billing-db-data:
billing-service-db-data: