# 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}:8080" volumes: # Persistent data storage - kalamdb_data:/data # Optional: Override server.toml with your own configuration # Uncomment the line below and create a local server.toml file # - ./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" # 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", "/usr/local/bin/busybox", "wget", "--spider", "-q", "http://127.0.0.1:8080/v1/api/healthcheck"] interval: 30s timeout: 5s start_period: 10s retries: 3 volumes: kalamdb_data: driver: local