Production Dockerfile
The orchestrator includes a multi-stage Dockerfile for containerized deployments.
Dockerfile
1# Build stage2FROM rust:1.75-slim as builder3WORKDIR /app4RUN apt-get update && apt-get install -y \5 pkg-config libssl-dev protobuf-compiler \6 && rm -rf /var/lib/apt/lists/*7COPY Cargo.toml Cargo.lock ./8COPY crates ./crates9COPY services/orchestrator ./services/orchestrator10WORKDIR /app/services/orchestrator11RUN cargo build --release1213# Runtime stage14FROM debian:bookworm-slim15RUN apt-get update && apt-get install -y \16 ca-certificates libssl3 curl \17 && rm -rf /var/lib/apt/lists/*18RUN useradd -m -u 1000 orchestrator19COPY --from=builder /app/target/release/orchestrator /usr/local/bin/orchestrator20USER orchestrator21EXPOSE 50051 808022HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \23 CMD curl -f http://localhost:8080/health/live || exit 124ENV LOG_LEVEL=info LOG_FORMAT=json \25 GRPC_BIND_ADDR=0.0.0.0:50051 HTTP_BIND_ADDR=0.0.0.0:808026ENTRYPOINT ["orchestrator"]Build and Run
1# From the repository root2docker build -f services/orchestrator/Dockerfile -t orcher-orchestrator .34docker run -d \5 --name orchestrator \6 --network orcher-network \7 -p 50051:50051 \8 -p 8001:8001 \9 -e DATABASE_URL="postgresql://orcher:orcher@orcher-pgbouncer:5432/orcher" \10 -e REDIS_URL="redis://orcher-redis:6379" \11 -e LOG_FORMAT=json \12 orcher-orchestratorKey Properties
- Non-root user — Runs as
orchestrator(uid 1000) - Health check — Checks
http://localhost:8080/health/liveevery 30 seconds - Minimal runtime —
debian:bookworm-slimwith onlyca-certificates,libssl3, andcurl - JSON logging — Default format set to
jsonfor production log aggregation
Full Production Stack
Combine the backing services with containerized orchestrator:
1# Start backing services2cd docker3docker compose up -d45# Build and run orchestrator on the same network6docker build -f services/orchestrator/Dockerfile -t orcher-orchestrator ..7docker run -d \8 --name orchestrator \9 --network orcher-network \10 -p 50051:50051 \11 -p 8001:8001 \12 -e DATABASE_URL="postgresql://orcher:orcher@orcher-pgbouncer:5432/orcher" \13 -e REDIS_URL="redis://orcher-redis:6379" \14 -e LOG_FORMAT=json \15 orcher-orchestratorDatabase migrations run automatically on orchestrator startup — no separate migration step is needed.
Next Steps
- Docker Overview — Quick start and Docker Compose services
- Configuration — Environment variables, CLI flags, and TOML configuration
- Troubleshooting — Health checks, volumes, and common issues
- Kubernetes — Deploy to Kubernetes with Helm charts