Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docker/m8flow-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ services:
- redis-data:/data

nats:
profiles: ["nats"]
container_name: m8flow-nats
image: nats:2.10-alpine
command: ["-js", "--store_dir=/data/nats", "-m", "8222"]
Expand All @@ -104,6 +105,7 @@ services:
restart: unless-stopped

m8flow-nats-consumer:
profiles: ["nats"]
container_name: m8flow-nats-consumer
build:
context: ..
Expand All @@ -119,12 +121,16 @@ services:
depends_on:
nats:
condition: service_healthy
required: false
m8flow-backend:
condition: service_started
environment:
M8FLOW_NATS_ENABLED: "${M8FLOW_NATS_ENABLED:-false}"
M8FLOW_NATS_URL: "nats://nats:4222"
M8FLOW_BACKEND_DATABASE_URI: "postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@m8flow-db:5432/${POSTGRES_DB:-postgres}"
SPIFFWORKFLOW_BACKEND_DATABASE_URI: "postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@m8flow-db:5432/${POSTGRES_DB:-postgres}"
M8FLOW_BACKEND_UPGRADE_DB: "false"
M8FLOW_BACKEND_SW_UPGRADE_DB: "false"
volumes:
- process_models_cache:/app/process_models
- ../data/m8flow_nats_consumer:/app/data/m8flow_nats_consumer
Expand Down Expand Up @@ -227,7 +233,7 @@ services:
M8FLOW_BACKEND_URL_FOR_FRONTEND: "${M8FLOW_BACKEND_URL_FOR_FRONTEND:-http://localhost:7001}"
M8FLOW_BACKEND_CELERY_BROKER_URL: "${M8FLOW_BACKEND_CELERY_BROKER_URL:-redis://redis:6379/0}"
M8FLOW_BACKEND_CELERY_RESULT_BACKEND: "${M8FLOW_BACKEND_CELERY_RESULT_BACKEND:-redis://redis:6379/0}"
M8FLOW_NATS_ENABLED: "true"
M8FLOW_NATS_ENABLED: "${M8FLOW_NATS_ENABLED:-false}"
M8FLOW_NATS_URL: "nats://nats:4222"
ports:
- "${M8FLOW_BACKEND_PORT:-7000}:8000"
Expand All @@ -249,6 +255,7 @@ services:
condition: service_started
nats:
condition: service_healthy
required: false

m8flow-celery-worker:
build:
Expand Down
2 changes: 1 addition & 1 deletion sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ MINIO_ROOT_PASSWORD=minioadmin
M8FLOW_STARTUP_DIAGNOSTICS=false

# --- NATS / Event Driven Architecture ---
M8FLOW_NATS_ENABLED=true
M8FLOW_NATS_ENABLED=false
M8FLOW_NATS_URL=nats://localhost:4222
M8FLOW_NATS_STREAM_NAME=M8FLOW_EVENTS
M8FLOW_NATS_SUBJECT=m8flow.events.>
Expand Down
Loading