services: # Production service herodb-prod: build: context: . dockerfile: Dockerfile container_name: herodb-production restart: unless-stopped ports: - "6379:6379" - "8080:8080" volumes: - herodb-data:/data # Optional: Unix socket for IPC - herodb-ipc:/tmp environment: - RUST_LOG=${RUST_LOG:-info} command: > --dir /data --port 6379 --admin-secret ${ADMIN_SECRET} --enable-rpc --rpc-port 8080 --enable-rpc-ipc --rpc-ipc-path /tmp/herodb.ipc healthcheck: test: ["CMD", "timeout", "2", "bash", "-c", " cargo run -- --dir /data --port 6379 --admin-secret ${ADMIN_SECRET:-devsecret} --enable-rpc --rpc-port 8080 --debug stdin_open: true tty: true networks: - herodb-network # Optional: Redis CLI for testing redis-cli: image: redis:7-alpine container_name: herodb-cli command: redis-cli -h herodb-prod -p 6379 depends_on: - herodb-prod networks: - herodb-network profiles: - tools volumes: herodb-data: driver: local herodb-dev-data: driver: local herodb-ipc: driver: local cargo-cache: driver: local target-cache: driver: local networks: herodb-network: driver: bridge