Skip to content

Docker Deployment

Multi-stage Dockerfile

AxumKit uses a multi-stage Dockerfile with cargo-chef for dependency caching.

Build Stages

  1. chef - installs cargo-chef on Rust base image
  2. planner - generates recipe.json
  3. builder - builds dependencies and binaries
  4. server-runtime - minimal image for API server
  5. worker-runtime - minimal image for worker

Build Images

bash
docker build --target server-runtime -t server .
docker build --target worker-runtime -t worker .

Security Notes

  • Runs as non-root user
  • Minimal runtime dependencies
  • Separate runtime targets for server and worker

Health Checks

ServiceHealth Check
PostgreSQLpg_isready -U postgres -d axumkit
Redisredis-cli ping
MeiliSearchcurl http://localhost:7700/health
NATSwget http://localhost:8222/healthz
Object Storagecurl http://localhost:9000/minio/health/live
Servercurl http://localhost:8000/health-check

Released under the MIT License.