Skip to content

Configuration

Use .env.example for local development and .env.production.example for VPS production.

Python installs in Docker/CI use requirements-lock.txt (regenerate with uv pip compile requirements.txt -o requirements-lock.txt).

Production (required)

bash APP_ENV=production DEBUG=false SECRET_KEY=<token_urlsafe 48> POSTGRES_PASSWORD=<strong> REDIS_PASSWORD=<strong> ADMIN_EMAIL=admin@yourcompany.com ADMIN_PASSWORD=<strong> AGENTBI_DOMAIN=agentbi.example.com CORS_ORIGINS=https://agentbi.example.com TRAEFIK_NETWORK=agentops-edge TRAEFIK_DIR=/home/smdg/traefik/dynamic SEED_DEMO_DATA=false JWT_EXPIRE_MINUTES=480 LOGIN_RATE_LIMIT_ENABLED=true LOG_JSON=true

Compose injects DATABASE_URL / REDIS_URL from POSTGRES_* / REDIS_PASSWORD.

bash SSO_PUBLIC_BASE_URL=https://agentbi.example.com SSO_FRONTEND_URL=https://agentbi.example.com SSO_AUTO_PROVISION=true SSO_SYNC_ROLES=true GOOGLE_SSO_ENABLED=true GOOGLE_CLIENT_ID=… GOOGLE_CLIENT_SECRET=…

Map email domains per tenant before users sign in (Authentication).

Stripe billing

bash STRIPE_SECRET_KEY=sk_… STRIPE_WEBHOOK_SECRET=whsec_… STRIPE_PRICE_PRO=price_… STRIPE_PRICE_BUSINESS=price_… STRIPE_SUCCESS_URL=https://agentbi.example.com/src/pages/settings.html?billing=success STRIPE_CANCEL_URL=https://agentbi.example.com/src/pages/settings.html?billing=cancel

Observability

bash SENTRY_DSN=https://…@….ingest.sentry.io/… SENTRY_SEND_DEFAULT_PII=false # or true if needed SENTRY_TRACES_SAMPLE_RATE=0.1

Deploy sets APP_VERSION / GIT_SHA from the image tag (IMAGE_TAG).

Local development

```bash APP_NAME=AgentBI APP_ENV=development DEBUG=true SECRET_KEY=change-me-to-a-long-random-secret-key-in-production API_V1_PREFIX=/api/v1

DATABASE_URL=postgresql+asyncpg://agentbi:agentbi@timescaledb:5432/agentbi DATABASE_URL_SYNC=postgresql://agentbi:agentbi@timescaledb:5432/agentbi REDIS_URL=redis://redis:6379/0

ADMIN_EMAIL=admin@example.com ADMIN_PASSWORD=admin123 ADMIN_NAME=AgentBI Admin

CORS_ORIGINS=http://localhost,http://localhost:3000,http://localhost:5173,http://agentbi.localhost SEED_DEMO_DATA=true ```

Volumes & paths

Volume / path Purpose
timescale_data PostgreSQL data
redis_data Redis persistence
backups/ Pre-migrate / cron dumps
VERSION / VERSION.prev Deployed SHA + previous (rollback)
deploy.log Deploy script log
Docker logs docker compose -f docker-compose.prod.yml logs -f api