Files
Alphaeus Mote b242509675 feat(deploy): bundled Postgres on the internal network by default [skip ci]
docker-compose.yml gains a postgres service (EXECUTER-DB-00001, official
image pinned by major and digest like NATS, INTERNAL network only, no host
port, pg_isready health check, shm_size, runs as PUID:PGID, data in
${STACK_BINDMOUNTROOT}/${STACK_NAME}/Postgres/Data). It is in the "postgres"
Compose profile; COMPOSE_PROFILES in .env turns it on, and the backend waits
for it healthy (depends_on required: false, so SQLite and external databases
start without it). The backend defaults to DATABASE_PROVIDER=postgres with
DATABASE_CONNECTION_STRING and DATABASE_PASSWORD from .env.
docker-compose.postgres-port.yml publishes a host port, opt-in through
POSTGRES_BIND.

deploy.sh decides the database: what .env names when the operator set it;
else SQLite when API/Data/app.db exists (written to .env, with a note on how
to move); else the bundled Postgres, its password generated into .env (and
exported), never regenerated over an existing database. COMPOSE_PROFILES
follows. The decisions are functions that scripts/tests/Test-DeployDatabase.sh
runs on fixtures without Docker. Compose 2.20.2+ is checked; a new .env is
mode 600. New-LocalSecrets.ps1 generates the password for a new .env and
keeps an existing .env's database settings on -Force.

README: deploy, secrets, Compose, database providers, Postgres backups and
pg_restore, and Moving from SQLite to Postgres (migrate-database).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 06:01:01 -05:00
..

Compose (single host)

The default single-host deployment.

# from the repository root
./scripts/deploy.sh                       # pull images (or build), start
./scripts/deploy.sh --with-proxy --host control.example.com

# or directly
cp .env.example .env                      # then fill secrets (NATS keys, DATABASE_PASSWORD)
docker compose -f IaC/compose/docker-compose.yml up -d --build

Files:

  • docker-compose.yml — postgres + nats + backend + webui. Relative build contexts and bind mounts are authored against this folder (../.. = repo root), so run it from the repository root as shown. postgres (the bundled database, INTERNAL network only) is in the postgres profile: COMPOSE_PROFILES=postgres in .env starts it, and deploy.sh sets that from DATABASE_PROVIDER (off for SQLite or your own database).
  • docker-compose.postgres-port.yml — opt-in host port for the bundled Postgres (POSTGRES_BIND, POSTGRES_PORT; deploy.sh adds it when POSTGRES_BIND is set).
  • docker-compose.dev.yml — development overrides (… -f docker-compose.yml -f docker-compose.dev.yml).
  • docker-compose.proxy.yml — opt-in in-stack nginx edge (deploy.sh --with-proxy).

For more than one backend/webui replica, move up to ../swarm or ../k8s — a single-host Compose file can't share the Data Protection key ring or split off a schedule worker.