Skip to content

Deployment Tiers

FreeSDN uses a single docker-compose.yml base file for every environment. You choose a scale tier with an env file (--env-file .env.<tier>) and opt into optional capabilities via COMPOSE_PROFILES. There is no separate production compose file - the same base runs everything.

AxisWhat it controlsHow you set it
Tier (Lite / Pro / Max / Dev)Worker count, concurrency, resource limits--env-file .env.<tier>
Features (cameras, pooling, DR, …)Optional capabilities at any tierCOMPOSE_PROFILES= in the env file

A homelab and an enterprise deployment run the same code and the same image. The differences are worker count and memory limits. Cameras, connection pooling, and off-site DR are features you enable at any tier - a Lite homelab can run cameras; a Max enterprise deployment can skip them.

LiteProMaxDev
Intended useHomelab / personalSMB, dozens-hundreds of devicesEnterprise / multi-siteLocal development
API workers (WEB_CONCURRENCY)1241 (uvicorn --reload)
Celery worker queuesAll queues on one workerdefault,priority (quick lane)default,priorityAll queues
I/O worker (io-worker profile)NoYesYesNo
Flower (monitoring profile)NoYesYesNo
PgBouncer (pooling profile)NoOptionalYesNo
Off-site DR (dr profile)NoOptionalYesNo
HA overlay (docker-compose.ha.yml)NoNoYes (opt-in)No
Resource limitsSmallModerateLargeMinimal
Terminal window
# Lite - homelab
docker compose --env-file .env.lite up -d
# Pro - SMB
docker compose --env-file .env.pro up -d
# Max - enterprise
docker compose --env-file .env.max up -d
# Max + HA overlay (Valkey Sentinel + Postgres standby)
docker compose --env-file .env.max -f docker-compose.yml -f docker-compose.ha.yml up -d
# Dev - local development with hot-reload
docker compose -f docker-compose.yml -f docker-compose.dev.yml --env-file .env.dev up -d

The one-command installer handles tier selection automatically:

Terminal window
./install.sh # auto-detect
./install.sh --tier pro --domain sdn.example.com
ContainerRole
postgresPrimary relational DB - 18 schemas, PostgreSQL 18.4
logdbTimescaleDB - metrics, syslog, NetFlow, health snapshots
redisValkey 8.1 - cache, session store, Celery broker (DB 0/1/2)
apiFastAPI + Gunicorn + Uvicorn workers
workerCelery worker - quick/priority lane (Lite: all queues)
schedulerCelery beat - scheduled tasks
pg-backupDaily GPG-encrypted dumps of both DBs
edge (or edge-nginx)Edge proxy - TLS termination, SPA serving, API reverse proxy

Defaults from the env example files:

ResourceLiteProMax
POSTGRES_MEM_LIMIT1 G2 G4 G
LOGDB_MEM_LIMIT1 G2 G4 G
REDIS_MEM_LIMIT256M768 M1 G
API_MEM_LIMIT768 M1 G2 G
WORKER_MEM_LIMIT768 M1 G2 G
WEB_CONCURRENCY124
CELERY_CONCURRENCY248

The default .env.pro sets COMPOSE_PROFILES=io-worker,monitoring, which splits Celery into two workers:

  • worker - handles default and priority queues (heartbeats, alert evaluation, notifications, backup orchestration)
  • worker-io - handles discovery, sync, and metrics queues (vendor Adapter calls, device scans)

This prevents a slow vendor API call from starving quick tasks such as alert notifications.

If your existing deploy uses -f docker-compose.prod.yml, it still works - that file is now a thin include: shim of the base. To adopt the tier model, copy the matching example env file and switch to --env-file .env.pro (or your tier). The base file defaults to production settings: ENVIRONMENT=production, Gunicorn, read-only rootfs, non-root users, internal-only data tier.

Next steps: Configuration - fill in your env file. Compose Profiles - full list of optional feature profiles.

All product names, logos, and brands are property of their respective owners. FreeSDN is an independent project and is not affiliated with or endorsed by the vendors it integrates with. See Trademarks.