-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (64 loc) · 2.3 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (64 loc) · 2.3 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
version: "3.9"
# =============================================================================
# semcod/protogate — full platform ecosystem
# =============================================================================
#
# Services
# --------
# generator one-shot: runs buf generate + all custom generators, then exits
# gateway FastAPI HTTP / WebSocket / SSE gateway (port 8080)
#
# Usage
# -----
# docker compose up generator # (re)generate all SDK artefacts
# docker compose up gateway # run the platform gateway
# docker compose up # run everything
#
# =============================================================================
services:
# ---------------------------------------------------------------------------
# generator – one-shot proto → SDK generation
# ---------------------------------------------------------------------------
generator:
build:
context: .
dockerfile: Dockerfile.generator
volumes:
# Mount generated/ so artefacts land on the host filesystem
- ./generated:/app/generated
- ./contracts:/app/contracts
command: make proto-all
environment:
- PYTHONPATH=/app
# ---------------------------------------------------------------------------
# gateway – FastAPI HTTP / WS / SSE platform gateway
# ---------------------------------------------------------------------------
gateway:
build:
context: .
dockerfile: gateway/Dockerfile
ports:
- "8080:8080"
volumes:
# Persist the event store and schema registry DBs on the host
- ./data:/app/data
environment:
- PYTHONPATH=/app
- EVENT_STORE_PATH=/app/data/event_store.db
- SCHEMA_REGISTRY_PATH=/app/data/schema_registry.db
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 3
restart: unless-stopped
# ---------------------------------------------------------------------------
# (Optional) schema-registry HTTP API – uncomment when needed
# ---------------------------------------------------------------------------
# registry-api:
# build:
# context: .
# dockerfile: Dockerfile.generator
# command: python scripts/schema_registry.py list
# depends_on:
# - gateway