# KalamDB Docker Compose Configuration (Single Node) # # This compose file runs the pre-built KalamDB Docker image. # Build the image first using: ./tools/build (select Docker option) # # Usage: # docker-compose up -d # Start in background # docker-compose logs -f # View logs # docker-compose down # Stop and remove # docker-compose down -v # Stop and remove with volumes # # To override server.toml, uncomment the config volume mount below. services: kalamdb: image: jamals86/kalamdb:latest container_name: kalamdb ports: - "${KALAMDB_PORT:-8088}:2900" volumes: # Persistent data storage - kalamdb_data:/data # Use the Docker-specific config from this folder so the container # binds to 0.0.0.0 and writes JSON logs queryable via system.server_logs. - ./server.toml:/config/server.toml:ro environment: # These are informational - actual config is in server.toml # To change settings, mount a custom server.toml (see volumes above) KALAMDB_SERVER_HOST: "0.0.0.0" RUST_LOG: "${RUST_LOG:-info}" # Required for non-localhost bind addresses (prevents insecure default) KALAMDB_JWT_SECRET: "${KALAMDB_JWT_SECRET:-kalamdb-docker-dev-secret-please-change-32chars}" # Allow initial setup from host machine when running in Docker KALAMDB_ALLOW_REMOTE_SETUP: "true" # TESTING ONLY: allow any browser origin so the sample Admin UI works out of the box. # Replace "*" with exact UI origins before using this outside local/demo environments. KALAMDB_SECURITY_CORS_ALLOWED_ORIGINS: "${KALAMDB_SECURITY_CORS_ALLOWED_ORIGINS:-*}" # TRUSTED_PROXY_RANGES is required when running in Docker to allow proper client IP detection for security features KALAMDB_SECURITY_TRUSTED_PROXY_RANGES: "10.0.1.9,10.0.0.0/8" restart: unless-stopped command: ["/usr/local/bin/kalamdb-server", "/config/server.toml"] healthcheck: test: ["CMD", "/bin/busybox", "wget", "--spider", "-q", "http://127.0.0.1:2900/v1/api/healthcheck"] interval: 30s timeout: 5s start_period: 10s retries: 3 volumes: kalamdb_data: driver: local