Docker Deployment
Multi-stage Dockerfile
AxumKit uses a multi-stage Dockerfile with cargo-chef for dependency caching.
Build Stages
chef- installs cargo-chef on Rust base imageplanner- generatesrecipe.jsonbuilder- builds dependencies and binariesserver-runtime- minimal image for API serverworker-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
| Service | Health Check |
|---|---|
| PostgreSQL | pg_isready -U postgres -d axumkit |
| Redis | redis-cli ping |
| MeiliSearch | curl http://localhost:7700/health |
| NATS | wget http://localhost:8222/healthz |
| Object Storage | curl http://localhost:9000/minio/health/live |
| Server | curl http://localhost:8000/health-check |