-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (77 loc) · 3.05 KB
/
Copy pathdocker-compose.yml
File metadata and controls
84 lines (77 loc) · 3.05 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
version: "3.9"
# ─────────────────────────────────────────────────────────────────────────────
# Local development stack for Financial Risk & Fraud Detection Platform
#
# Services:
# postgres — PostgreSQL 16 (historical/dimensional data source)
# pubsub — Google Cloud Pub/Sub emulator (local streaming)
# adminer — lightweight DB admin UI (http://localhost:8080)
#
# Usage:
# docker compose up -d # start all services
# docker compose down -v # stop and remove volumes
# docker compose logs -f # follow all logs
# ─────────────────────────────────────────────────────────────────────────────
services:
# ── PostgreSQL 16 ────────────────────────────────────────────────────────────
postgres:
image: postgres:16-alpine
container_name: frp_postgres
restart: unless-stopped
environment:
POSTGRES_DB: financial_risk
POSTGRES_USER: fraud_user
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change_me_local}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./infrastructure/postgres/init.sql:/docker-entrypoint-initdb.d/01_init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U fraud_user -d financial_risk"]
interval: 10s
timeout: 5s
retries: 5
networks:
- frp_network
# ── Pub/Sub Emulator ──────────────────────────────────────────────────────────
pubsub-emulator:
image: gcr.io/google.com/cloudsdktool/cloud-sdk:emulators
container_name: frp_pubsub
restart: unless-stopped
command: >
gcloud beta emulators pubsub start
--host-port=0.0.0.0:8085
--project=${GCP_PROJECT_ID:-local-project}
ports:
- "8085:8085"
environment:
PUBSUB_EMULATOR_HOST: 0.0.0.0:8085
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8085 || exit 1"]
interval: 15s
timeout: 10s
retries: 5
networks:
- frp_network
# ── Adminer (Database UI) ─────────────────────────────────────────────────────
adminer:
image: adminer:4
container_name: frp_adminer
restart: unless-stopped
ports:
- "8080:8080"
environment:
ADMINER_DEFAULT_SERVER: postgres
depends_on:
postgres:
condition: service_healthy
networks:
- frp_network
volumes:
postgres_data:
name: frp_postgres_data
networks:
frp_network:
name: frp_network
driver: bridge