Skip to main content

Deployment

Docker Compose configurations to run the Arcane stack locally with different trace backends and message brokers.

Prerequisites

  • Docker and Docker Compose
  • Images are pre-built and published to a Docker registry; Compose pulls them automatically

Choose a Compose

VariantTrace BackendMessage BrokerCompose File
BaseNoneRabbitMQbase/docker-compose.base.yml
TempoTempoRabbitMQtempo/docker-compose.tempo-rabbitmq.yml
TempoTempoKafkatempo/docker-compose.tempo-kafka.yml
JaegerJaegerRabbitMQjaeger/docker-compose.jaeger-rabbitmq.yml
JaegerJaegerKafkajaeger/docker-compose.jaeger-kafka.yml
ClickHouseClickHouseRabbitMQclickhouse/docker-compose.clickhouse-rabbitmq.yml
ClickHouseClickHouseKafkaclickhouse/docker-compose.clickhouse-kafka.yml
  • Base: Minimal run (postgres, rabbitmq, frontend, backend, worker). No trace backend.
  • Trace variants: Add Grafana Tempo, Jaeger, or ClickHouse for trace storage and querying.

Quick Start

Step 1: Clone the repository

git clone git@github.com:ArcaneTracing/arcane-deployment.git arcane-deployment
cd arcane-deployment

Verify: You should see directories base/, tempo/, jaeger/, clickhouse/, and a file .env.example.

Step 2: Copy and configure environment

cp .env.example .env
# Edit .env as needed for production, or use defaults for local dev

Verify the copy worked:

ls -la .env
# Should show .env exists
cat .env | head -5
# Should show your variables (or defaults)

Step 2b: Generate and set auth & security secrets (required for production)

These four variables are critical — never use defaults in production. Generate secure values and add them to .env:

1. Generate values:

# BETTER_AUTH_SECRET, INTERNAL_API_KEY, API_KEY_SALT (base64, 32 bytes)
openssl rand -base64 32

# ENCRYPTION_KEY (64 hex chars) — run this separately
openssl rand -hex 32

2. Edit .env and replace the defaults with your generated values:

# Auth & Security (required in production)
BETTER_AUTH_SECRET='<paste output of: openssl rand -base64 32>'
INTERNAL_API_KEY='<paste output of: openssl rand -base64 32>'
API_KEY_SALT='<paste output of: openssl rand -base64 32>'

# Generate with: openssl rand -hex 32 (produces 64 chars)
ENCRYPTION_KEY=<paste output of: openssl rand -hex 32>

Example (do not use these — generate your own):

BETTER_AUTH_SECRET='mTRokjXWBfabfjF5P5+welH+JXp1QhDCGmmZlyJKzlk='
INTERNAL_API_KEY='AEQcfdFdn8yXGVzis09qwBOkTtVu7Kp83Rcps085fss='
API_KEY_SALT='ndKTQciT/TaZmOupPJ0oTO0EaiYozFxPLI909nHZr+g='

# Generate with: openssl rand -hex 32
ENCRYPTION_KEY=61d24cf9bcbe65d0d114b1341614f164f41f17f12c3154e604616ad21201b5f0

Verify: grep -E "BETTER_AUTH_SECRET|INTERNAL_API_KEY|API_KEY_SALT|ENCRYPTION_KEY" .env — all four should show your values, not the dev- defaults.

Step 3: Load environment variables

Compose uses variable substitution (e.g. ${DATABASE_URL:-default}). Load .env into your shell before running compose:

set -a && source .env && set +a

Verify: Run echo $DATABASE_URL — you should see the connection string (or empty if using default).

Step 4: Run the compose

From the project root, run the compose file for your chosen variant:

# Base (minimal, no trace backend)
docker compose -f base/docker-compose.base.yml up -d

# Example: Tempo + RabbitMQ
docker compose -f tempo/docker-compose.tempo-rabbitmq.yml up -d

# Example: ClickHouse + Kafka
docker compose -f clickhouse/docker-compose.clickhouse-kafka.yml up -d

Verify: Containers should start. Check with docker compose -f <your-compose-file> ps — all services should show "running".

Step 5: Add a datasource in Arcane

Once the stack is running, open the Arcane frontend and add a datasource. The backend runs in a container, so use these URLs when configuring the datasource:

Trace BackendDatasource URL (use in Arcane)
Tempohttp://tempo:3200 or http://localhost:3200
Jaegerhttp://jaeger:16686
ClickHousehttp://clickhouse:8123

Tempo compose files add extra_hosts so the backend can reach host-exposed ports via localhost. For Jaeger/ClickHouse, use the service name (e.g. http://jaeger:16686).

Access URLs

ServiceURL
Frontendhttp://localhost:3000
Backend APIhttp://localhost:8085
Jaeger UIhttp://localhost:16686 (Jaeger variants only)
RabbitMQ Managementhttp://localhost:15672 (RabbitMQ variants)
Tempohttp://localhost:3200 (Tempo variants)
ClickHousehttp://localhost:8123 (ClickHouse variants)
Kafkalocalhost:9092 (Kafka variants)

Environment Variables

All compose files use environment variables. Set variables in .env and load them into your shell before running compose (e.g. set -a && source .env && set +a) so variable substitution works.

Database

VariableDescriptionDefault
DATABASE_URLPostgreSQL connection stringpostgresql://user:password@postgres:5432/arcanedb
DATABASE_SSLEnable SSL for DBfalse
POSTGRES_USERPostgres container useruser
POSTGRES_PASSWORDPostgres container passwordpassword
POSTGRES_DBPostgres database namearcanedb

Message Broker

RabbitMQ variants:

VariableDescriptionDefault
RABBITMQ_URLRabbitMQ connection URLamqp://guest:guest@rabbitmq:5672/

Kafka variants:

VariableDescriptionDefault
KAFKA_BROKERSComma-separated broker listkafka:9092

Worker–Backend Topics (evaluation & experiment queues)

These topics/queues handle communication between the worker and backend for evaluations and experiments. Set them if you need custom topic names; otherwise defaults from the compose apply.

VariableDescription
EVALUATION_JOBS_TOPICTopic for evaluation job requests (backend → worker)
EVALUATION_RESULTS_TOPICTopic for evaluation results (worker → backend)
EXPERIMENT_JOBS_TOPICTopic for experiment job requests (backend → worker)
EXPERIMENT_RESULTS_TOPICTopic for experiment results (worker → backend)

Auth & Security (required in production)

VariableDescriptionDefault
BETTER_AUTH_SECRETAuth token encryptiondev-secret-change-in-production
INTERNAL_API_KEYInternal API signing keydev-jwt-secret
ENCRYPTION_KEY64+ char key for model config encryptiondev-encryption-key-64-chars-minimum-required-for-production-safe
API_KEY_SALTSalt for API key hashingdev-api-key-salt

Generate secure values: openssl rand -base64 32

For ENCRYPTION_KEY (64 chars): openssl rand -hex 32

URLs

VariableDescriptionDefault
BETTER_AUTH_URLBackend URL (auth callbacks)http://localhost:8085 or http://backend:8085
FRONTEND_URLFrontend URL (CORS, redirects)http://localhost:3000 or http://frontend:3000

SMTP (optional, for invite emails)

VariableDescriptionDefault
SMTP_HOSTSMTP server host(empty)
SMTP_PORTSMTP port587
SMTP_SECUREUse TLSfalse
SMTP_USERSMTP username(empty)
SMTP_PASSSMTP password(empty)
MAIL_FROMFrom addressno-reply@example.com

Optional

VariableDescription
ARCANE_ENTERPRISE_LICENSEEnterprise license key (base64)

Directory Layout

arcane-deployment/
├── config/ # OTEL and Tempo configs
├── base/ # Base compose (minimal, no trace backend)
├── tempo/ # Tempo + Kafka/RabbitMQ
├── jaeger/ # Jaeger + Kafka/RabbitMQ
├── clickhouse/ # ClickHouse + Kafka/RabbitMQ
├── .env.example # Example env file
└── README.md