One VPS. Docker runs only the database; everything else is native:
db— Docker container (ghcr.io/dimslaev/pgvector:pg17), published on127.0.0.1:5432caddy— apt package + systemd; TLS, servesfrontend/dist, reverse-proxiesapi.to the backendagentique-backend.service— FastAPI via uv venv, 4 workers,127.0.0.1:8000agentique-pipeline.service+.timer— daily at 04:00
Everything lives in /opt/agentique. The unit files and Caddyfile are versioned in deploy/, which also documents the one-time VPS setup, the user/permission model, and the sudoers rule.
Push to master → .github/workflows/deploy-production.yml builds the frontend on a GitHub-hosted runner, then the self-hosted runner on the VPS syncs it to /opt/agentique, runs migrations, and restarts the backend. Full step-by-step in deploy/README.md.
Notes:
- Migrate-then-restart: additive migrations only; a few seconds of downtime per deploy is accepted.
- Rollback =
git revert+ push (which redeploys). No release directories or symlinks. - The pipeline picks up new code automatically — the timer starts a fresh process each run.
- GitHub side: just
DOMAIN_PRODUCTION(used for the frontend build URL), in theproductionenvironment. - Box side:
/opt/agentique/.env, hand-written once, never touched by CI. The VPS is the source of truth — back the file up to the password manager. It must setENVIRONMENT=productionandPOSTGRES_SERVER=localhost.
A GitHub Actions runner on the VPS with labels self-hosted + production, installed as a service (official guide). Runs as whichever user the runner was registered under (see deploy/README.md for the current one — don't duplicate it here, it's the kind of detail that drifts). The runner only needs: write access to /opt/agentique, uv, and the narrow sudoers rule from deploy/README.md.
cd /opt/agentique && docker compose up -d- The volume is
agentique_app-db-data. Never rundocker compose down -von prod —-vdeletes it. - Postgres is published on loopback only. For remote inspection, tunnel:
ssh -L 5432:localhost:5432 <vps>and point a client atlocalhost:5432. - Backups:
docker compose exec db pg_dump -U <user> <db> > dump.sql, copy it off the box.
- Frontend:
https://agentique.ch(www.redirects to apex) - API:
https://api.agentique.ch(docs at/docs)