- infra/compose/nats.yml: NATS server with JetStream, persistence volume, healthcheck - infra/compose/dapr.yml: Dapr placement service for sidecar coordination - infra/dapr/: Dapr global config, pubsub component (NATS), statestore (Redis) - infra/compose/scraper.yml: add Dapr sidecar container + depends_on nats/dapr - docs/add-dapr-service.md: guide for integrating Dapr into new services - docs/add-new-app.md: add Dapr sidecar step - ARCHITECTURE.md: add NATS/Dapr to infra table + service mesh diagram - infra/README.md: update layout and deployment order - deploy-docker.yml: add nats.yml + dapr.yml to ALL_COMPOSE_FILES Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
33 lines
657 B
YAML
33 lines
657 B
YAML
services:
|
|
nats:
|
|
container_name: nats
|
|
image: nats:latest
|
|
restart: always
|
|
networks:
|
|
app-shared-net:
|
|
aliases:
|
|
- nats
|
|
ports:
|
|
- '4222:4222' # client connections
|
|
- '8222:8222' # HTTP monitor / health
|
|
command:
|
|
- '--jetstream'
|
|
- '--store_dir=/data'
|
|
- '--max_payload=8MB'
|
|
volumes:
|
|
- nats_data:/data
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'wget --spider http://localhost:8222/healthz || exit 1']
|
|
interval: 15s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
|
|
volumes:
|
|
nats_data:
|
|
|
|
networks:
|
|
app-shared-net:
|
|
name: app-shared-net
|
|
external: true
|