DeploymentPostgres

Postgres

Point AutoPIL at Postgres, with automatic schema creation and safe idempotent migrations.

Configure Postgres

# Full Stack edition
pip install "autopil-saas[catalog]"
export DATABASE_URL=postgresql://user:pass@host:5432/autopil
export AUTOPIL_SECRET_KEY=your-secret
export AUTOPIL_POLICY=./policies
autopil-saas-serve

# Core edition
pip install "autopil[server,postgres]"
export DATABASE_URL=postgresql://user:pass@host:5432/autopil
autopil-serve --policy policies/

Schema and migrations

Schema is created automatically on first start. Subsequent starts run ALTER TABLE … ADD COLUMN IF NOT EXISTS migration guards — safe to run against existing databases. The docker-compose.yml starts postgres:16-alpine and wires DATABASE_URL automatically.