Overview
QIMEM provides official Docker images and Docker Compose configurations for both the encryption service (qimem-api) and the unified platform server (qauth-api).
Quick Start
Docker Compose Configuration
Services
Thedocker-compose.yml defines three services:
PostgreSQL Database
The PostgreSQL service is required when running QIMEM in stateful mode. The health check ensures the database is ready before dependent services start.
QIMEM API Service
Port Mappings
| Service | Container Port | Host Port | Purpose |
|---|---|---|---|
postgres | 5432 | 5432 | PostgreSQL database |
qimem-api | 8080 | 8080 | QIMEM encryption API |
qauth-api | 8080 | 8080 | Unified platform API |
Health Checks
PostgreSQL Health Check
- Interval: 5 seconds
- Timeout: 5 seconds
- Retries: 20 (100 seconds total)
QIMEM API Health Check
- Interval: 10 seconds
- Timeout: 3 seconds
- Retries: 10 (100 seconds total)
Volume Configuration
Dockerfile
The multi-stage Dockerfile builds theqimem-api binary with the stateful feature:
Build Features
- Builder stage: Uses
rust:1.82-slimwith--features stateful - Runtime stage: Uses
debian:bookworm-slimwith minimal dependencies - Security: Runs as non-root user
qimem(UID 10001) - Optimizations: Binary is stripped to reduce image size
- Dependencies: Includes
ca-certificatesandcurlfor health checks
Deployment Scenarios
Running qauth-api vs qimem-api
qimem-api (Encryption Only)
Provides key management and encryption operations:GET /healthPOST /keysPOST /encryptPOST /decryptPOST /rotate
qauth-api (Unified Platform)
Provides encryption + authentication + plugin management:/v1/security/*- Encryption operations/v1/auth/*- Authentication (JWT, TOTP, RBAC)/v1/plugins/*- Plugin registration/healthand/v1/security/health- Health checks
The
qauth-api binary is not included in the default Dockerfile. Build it separately or modify the Dockerfile to include it.Troubleshooting
Service fails to start
Check that PostgreSQL is healthy:Connection refused errors
Verify theDATABASE_URL uses the service name: