Deployment
Default Docker deployment
From repo root:
docker compose up -d
Services:
- frontend:
:5050 - backend:
:5656 - postgres:
:5434 - redis:
:8946
Backend image/runtime notes
- Backend is built from the Go
1.26codebase and runs as a distroless binary image. - Frontend builds the Angular
21.1app and serves the static build via nginx.
Production recommendations
- Set strong
PROXY_ENCRYPTION_KEYandJWT_SECRET. - Optionally override
DB_USERNAME,DB_PASSWORD, andDB_NAME(Compose provides defaults). - Set
DB_SSLMODE=require(orverify-ca/verify-full) when using an external/production Postgres endpoint. - Use persistent volumes for Postgres and backend settings if needed.
- Put reverse proxy/TLS in front of frontend and backend.
- Restrict database and redis exposure to private network.
- Back up Postgres regularly.
Default Compose includes CPU/memory limits and reservations per service. Tune them with *_CPU_LIMIT, *_MEMORY_LIMIT, *_CPU_RESERVATION, and *_MEMORY_RESERVATION env vars.
Before production rollout, run the load/soak gate documented in Performance Validation.
Multi-instance considerations
Leader-based routines use Redis locks. If running multiple backend instances, ensure all instances share the same Redis and database.
For rotating proxy listeners, set per-instance identity vars so instances are distinguishable in the UI and API:
MAGPIE_INSTANCE_ID: stable unique id for the instance.MAGPIE_INSTANCE_NAME: display name for the instance.MAGPIE_INSTANCE_REGION: region label for the instance.
Optionally tune listener reconciliation:
ROTATING_PROXY_SYNC_INTERVAL_SECONDS(default10).