Docker Deployment
This page covers the Docker deployment assets shipped in this repository.
Docker assets:
Dockerfiledocker-compose.ymldocker-compose.dev.ymlinfra/docker/start.sh
Default Stack
docker compose up --build
Services:
keynetraAPI- PostgreSQL
- Redis
- Prometheus
- Grafana
Default exposed ports:
- API:
8000 - Postgres:
5432 - Redis:
6379 - Prometheus:
9090 - Grafana:
3000
Development Stack
docker compose -f docker-compose.dev.yml up --build
Includes source mount and Uvicorn reload.
Use this stack for iterative local development when you need auto-reload behavior.
Startup Behavior
Container entrypoint script:
- Runs Alembic migrations if
KEYNETRA_RUN_MIGRATIONS=1 - Renders startup dashboard when enabled
- Exports rich logging defaults
- Starts Uvicorn workers
Implementation: infra/docker/start.sh
Useful Environment Values
KEYNETRA_DATABASE_URLKEYNETRA_REDIS_URLKEYNETRA_API_KEYSKEYNETRA_ADMIN_USERNAMEKEYNETRA_ADMIN_PASSWORDKEYNETRA_UVICORN_WORKERSKEYNETRA_LOG_FORMAT=richKEYNETRA_FORCE_COLOR=1
Example override:
KEYNETRA_API_KEYS=devkey KEYNETRA_AUTO_SEED_SAMPLE_DATA=1 docker compose up --build
Health Endpoints
GET /healthGET /health/liveGET /health/ready