Monorepo consolidation: workspace, shared types, transport plans, docker/swam assets
This commit is contained in:
126
docker-compose.yml
Normal file
126
docker-compose.yml
Normal file
@@ -0,0 +1,126 @@
|
||||
services:
|
||||
nats:
|
||||
image: nats:2.10-alpine
|
||||
command: ["-js", "-m", "8222"]
|
||||
ports:
|
||||
- "4222:4222"
|
||||
- "8222:8222"
|
||||
|
||||
gateway:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.rust
|
||||
args:
|
||||
PACKAGE: gateway
|
||||
BIN: gateway
|
||||
depends_on:
|
||||
- nats
|
||||
environment:
|
||||
GATEWAY_ADDR: 0.0.0.0:8080
|
||||
GATEWAY_GRPC_ADDR: 0.0.0.0:8081
|
||||
GATEWAY_STORAGE_PATH: /data/gateway.mdbx
|
||||
GATEWAY_ROUTING_FILE: /config/routing.json
|
||||
volumes:
|
||||
- gateway_data:/data
|
||||
- ./routing/dev.json:/config/routing.json:ro
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "8081:8081"
|
||||
|
||||
aggregate:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.rust
|
||||
args:
|
||||
PACKAGE: aggregate
|
||||
BIN: aggregate
|
||||
depends_on:
|
||||
- nats
|
||||
environment:
|
||||
AGGREGATE_NATS_URL: nats://nats:4222
|
||||
AGGREGATE_STORAGE_PATH: /data
|
||||
AGGREGATE_HTTP_ADDR: 0.0.0.0:8080
|
||||
AGGREGATE_GRPC_ADDR: 0.0.0.0:50051
|
||||
volumes:
|
||||
- aggregate_data:/data
|
||||
ports:
|
||||
- "50051:50051"
|
||||
- "18080:8080"
|
||||
|
||||
projection:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.rust
|
||||
args:
|
||||
PACKAGE: projection
|
||||
BIN: projection
|
||||
depends_on:
|
||||
- nats
|
||||
environment:
|
||||
PROJECTION_NATS_URL: nats://nats:4222
|
||||
PROJECTION_STREAM_NAME: AGGREGATE_EVENTS
|
||||
PROJECTION_DURABLE_NAME: projection
|
||||
PROJECTION_STORAGE_PATH: /data
|
||||
PROJECTION_MANIFEST_PATH: /config/projection-manifest.yaml
|
||||
PROJECTION_MULTI_TENANT: "true"
|
||||
PROJECTION_MAX_IN_FLIGHT: "128"
|
||||
PROJECTION_ACK_TIMEOUT_MS: "30000"
|
||||
PROJECTION_MAX_DELIVER: "10"
|
||||
volumes:
|
||||
- projection_data:/data
|
||||
- ./projection/projection-manifest.yaml:/config/projection-manifest.yaml:ro
|
||||
|
||||
runner:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.rust
|
||||
args:
|
||||
PACKAGE: runner
|
||||
BIN: runner
|
||||
depends_on:
|
||||
- nats
|
||||
environment:
|
||||
RUNNER_NATS_URL: nats://nats:4222
|
||||
RUNNER_STORAGE_PATH: /data/runner.mdbx
|
||||
RUNNER_MODE: combined
|
||||
RUNNER_HTTP_ADDR: 0.0.0.0:8080
|
||||
RUNNER_SAGA_MANIFEST_PATH: /config/sagas.yaml
|
||||
RUNNER_EFFECTS_MANIFEST_PATH: /config/effects.yaml
|
||||
volumes:
|
||||
- runner_data:/data
|
||||
- ./runner/config:/config:ro
|
||||
ports:
|
||||
- "28080:8080"
|
||||
|
||||
control-api:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.rust
|
||||
args:
|
||||
PACKAGE: api
|
||||
BIN: api
|
||||
environment:
|
||||
CONTROL_API_ADDR: 0.0.0.0:8080
|
||||
CONTROL_PLACEMENT_PATH: /etc/control/placement.json
|
||||
CONTROL_SWARM_STATE_PATH: /etc/control/swarm_state.json
|
||||
CONTROL_SELF_URL: http://control-api:8080
|
||||
volumes:
|
||||
- ./placement/dev.json:/etc/control/placement.json:ro
|
||||
- ./swarm/dev.json:/etc/control/swarm_state.json:ro
|
||||
ports:
|
||||
- "38080:8080"
|
||||
|
||||
control-ui:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: docker/Dockerfile.ui
|
||||
environment:
|
||||
VITE_CONTROL_API_URL: http://localhost:38080
|
||||
ports:
|
||||
- "8082:80"
|
||||
|
||||
volumes:
|
||||
aggregate_data:
|
||||
gateway_data:
|
||||
projection_data:
|
||||
runner_data:
|
||||
Reference in New Issue
Block a user