Skip to content

Configuration

Docker Compose reads deployment values from apps/backend/docker-compose/.env. Start from .env.example; it is the versioned reference for the current stack.

VariableTemplate defaultUsed for
WEB_PORT3001Published web-app port
API_PORT8080Published Nginx API-gateway port
NEXT_PUBLIC_API_URLhttp://localhost:8080API URL used by the browser
NEXT_PUBLIC_REDIRECT_URLhttp://localhost:3001/callbackLogin callback
NEXT_PUBLIC_REDIRECT_LOGOUT_URLhttp://localhost:3001/Post-logout redirect
SIGNALING_PORT4444Published realtime signaling port
COMPILER_PORT8081Published WASM compiler port

The web URLs are build arguments. Rebuild web when they change. The signaling URL and authentication provider are also represented in the hub configuration file, so keep both sources consistent.

VariableTemplate defaultNotes
POSTGRES_USERflowlikePostgreSQL role
POSTGRES_PASSWORDflowlike_dev_change_meChange for every real deployment
POSTGRES_DBflowlikeDatabase name
POSTGRES_PORT5432Host port; containers use postgres:5432
REDIS_PORT6379Host port; containers use redis:6379
EXECUTION_STATE_BACKENDredisredis or postgres
EXECUTION_STATE_TTL_SECONDS86400Retention for run-state entries

The supplied Compose file constructs its internal database and Redis URLs. A managed external database requires a deliberate Compose override, not only a new DATABASE_URL line in .env.

VariableTemplate defaultNotes
API_REPLICAS2Internal API replicas behind api-gateway
RUNTIME_REPLICAS3Shared runtime replicas
MAX_CONCURRENT_EXECUTIONS10Concurrent runs per runtime process
EXECUTION_TIMEOUT_SECONDS3600Maximum run duration
QUEUE_WORKER_CONCURRENCY10Redis queue consumers per runtime
QUEUE_POLL_TIMEOUT_SECS30Blocking queue-poll timeout

MAX_CONCURRENT_EXECUTIONS and QUEUE_WORKER_CONCURRENCY describe different entry paths. Size both against CPU, memory, external-service limits, and the work done by a typical Flow.

The API has separate configuration lanes for interactive and background runs:

VariableTemplate defaultPurpose
EXECUTION_BACKENDhttpInteractive/streaming dispatch
ASYNC_EXECUTION_BACKENDredisBackground dispatch
EXECUTOR_URLhttp://runtime:9000HTTP runtime target
REDIS_EXECUTION_QUEUEexec:jobsRedis list consumed by runtime workers
QUEUE_WORKER_ENABLEDtrueEnables the runtime’s Redis consumer

The Compose topology is wired for HTTP and Redis. Other supported dispatch backends need their own infrastructure and environment variables; see Execution Backends.

VariableRequiredPurpose
BACKEND_KEYYes for API dispatchBase64 PKCS#8 P-256 private key; API only
BACKEND_PUBYesBase64 P-256 public key; API, runtime, and compiler
BACKEND_KIDRecommendedJWKS key identifier

Generate a matching set from the repository root:

Terminal window
./tools/gen-execution-keys.sh --export

Do not use the older EXECUTION_KEY, EXECUTION_PUB, or EXECUTION_KID names with this stack.

VariableTemplate defaultPurpose
STORAGE_PROVIDERawsBacking-store provider; the stock API build supports Azure/GCP and the documented R2 bridge, but omits AWS runtime credentials
RUNTIME_CREDENTIALS_PROVIDERCopied .env.example leaves it emptyMust be deleted from .env or set to a non-empty supported provider; explicit empty is invalid
META_BUCKETflow-like-metaApp and Flow metadata
CONTENT_BUCKETflow-like-contentUser and App content
LOG_BUCKETflow-like-logsExecution logs
CDN_BUCKET_NAMECopied .env.example leaves it emptySet an actual bucket/container; the Compose template injects the empty value and prevents fallback

Provider-specific credentials, endpoints, bucket overrides, scoped runtime credentials, and S3-compatible services are covered in Storage Providers.

The same explicit-empty behavior applies to the provider-specific bucket names that Compose injects. Set the selected provider’s meta, content, and log names even when they match the generic names.

VariableTemplate defaultPurpose
COMPILATION_BACKENDhttp in .env.exampleinline, http, or redis
COMPILER_URLhttp://compiler:8081Internal compiler endpoint
WASM_COMPILATION_TARGETSemptyOptional comma-separated target list
COMPILER_TIMEOUT_SECS600Compiler timeout
COMPILER_CALLBACK_TIMEOUT_MS10000Callback request timeout
COMPILER_CALLBACK_RETRIES3Callback retry count
COMPILER_MAX_PARALLEL_TARGETSall CPU coresTarget build concurrency
VariableRequired when enabledPurpose
SINK_SECRETYesShared secret used to sign sink trigger JWTs
SINK_TRIGGER_JWTYesScoped token used by sink-services
SINK_TOKEN_ENCRYPTION_KEYYes in productionEncrypts stored sink tokens
FLOW_LIKE_RUNTIME_CONFIG_FILEYesHub configuration mounted into the service

Supported sink types are enabled in the hub configuration, not with one environment switch per adapter.

The template can pass credentials and endpoints for OpenRouter, OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, and Google Vertex AI. Populate only the providers exposed by your hub configuration and model records. Keep provider keys in .env or a deployment secret store, never in the JSON hub configuration.

The complete variable names and default endpoints are grouped under LLM / Model Provider Configuration in .env.example.

VariableTemplate defaultPurpose
PROMETHEUS_PORT9091Published Prometheus port
GRAFANA_PORT3002Published Grafana port
GRAFANA_ADMIN_USERadminInitial Grafana user
GRAFANA_ADMIN_PASSWORDadminChange before exposure
TEMPO_HTTP_PORT3200Published Tempo query port
TEMPO_OTLP_GRPC_PORT4317OTLP gRPC
TEMPO_OTLP_HTTP_PORT4318OTLP HTTP
OTEL_TRACES_SAMPLER_ARG0.1Trace sampling ratio

These containers start only with the monitoring profile. See Monitoring.

Terminal window
docker compose config --quiet
docker compose up -d --build
docker compose ps --all

Use docker compose config without --quiet only in a trusted terminal: interpolated output can contain credentials.