Deployment
The generic deploy kit works for a buyer's server. The public demo has a one-command overlay that renders its own service, Nginx and read-only environment.
Public demo#
deploy/demo/prepare.sh resolves the checkout path from its own location, defaults to Gunicorn on 127.0.0.1:8070 and renders ignored files for a systemd unit, Nginx bootstrap/TLS configs and a read-only demo .env. Set DOCS_SITE_URL to the documentation host so the demo notice and footer link to the public manual.
./deploy/demo/prepare.sh
cp deploy/demo/generated/demo.env .env
.venv/bin/python manage.py migrate --noinput
.venv/bin/python manage.py seed_zephai
.venv/bin/python manage.py collectstatic --noinput
./deploy/demo/release.sh
The demo is read-only: notification writes, preference saves and studio edits are hidden while the bell, filters and detail modal remain usable. The update wrapper sets SERVICE_NAME=zephai-demo, HEALTH_PORT=8070 and SEED_DEMO=1 before calling the generic release script.
Systemd#
[Unit]
Description=ZephAI
After=network.target
[Service]
User=zephai
WorkingDirectory=/srv/zephai
EnvironmentFile=/srv/zephai/.env
ExecStart=/srv/zephai/.venv/bin/gunicorn config.wsgi:application \
--workers 3 --bind 127.0.0.1:8010
Restart=always
[Install]
WantedBy=multi-user.target
Nginx#
Proxy to Gunicorn, serve /static/ and public /media/, disable buffering for SSE, set client body limits for uploads and redirect HTTP to HTTPS. See deploy/nginx.conf.
Release checklist#
git pulland install requirements.migrate,collectstatic,check --deploy.- Restart the service (not HUP) so
.envis reloaded. - Probe
/health/ready/and the public home. - Run the smoke tests and verify a chat call with a low-cap key.
Backups#
Back up PostgreSQL and media/ together. Store them encrypted off the application host. Test a restore before launch.