Docker Deployment
The repository’s docker-compose.yml runs the whole stack. Services are split into two profiles that share one Postgres:
| Service | Profile | Ports | Notes |
|---|---|---|---|
db | always | 5432 | postgres:16-alpine, database bizon_platform, user and password bizon |
api | prod | 8000 | Runs alembic upgrade head, then the API |
worker | prod | Polls for runs | |
ui | prod | 3000 | nginx serving the built UI and proxying /api to api |
api-dev | dev | 8000 | Same as api, with uvicorn --reload and ./bizon_platform mounted |
worker-dev | dev | Restarts on code changes | |
ui-dev | dev | 5173 | Vite dev server in node:22, proxying /api to api-dev |
All app services mount ./custom_sources at /custom_sources and share the bizon_outputs volume at /tmp/bizon-outputs for logs and outputs.
cp .env.example .env # then set ENCRYPTION_KEY, e.g. from `make key`
make dev # docker compose --profile dev upmake prod # docker compose --profile prod up -dmake prod-build and make dev-build rebuild the images first. make down stops both profiles, and make clean also deletes the volumes, including the database.
Check that it is up:
curl http://localhost:8000/api/health# {"status":"ok","database":"ok"}Environment variables
Section titled “Environment variables”Compose sets DATABASE_URL, STORAGE_LOCAL_PATH and CUSTOM_SOURCES_DIR itself. Every other variable comes from .env, which the api, worker, api-dev and worker-dev services load when it exists. That covers ENCRYPTION_KEY, ADMIN_PASSWORD, the GIT_SYNC_* settings, and the credentials your pipelines read:
ENCRYPTION_KEY=...ADMIN_PASSWORD=...GIT_SYNC_ENABLED=trueGIT_SYNC_REPO_URL=https://github.com/acme/bizon-sources.gitGIT_SYNC_TOKEN=...HUBSPOT_TOKEN=...See Configuration for every variable.
Scale workers
Section titled “Scale workers”Each worker runs one pipeline at a time. Run more of them for parallel runs:
docker compose --profile prod up -d --scale worker=4Workers claim runs with SELECT ... FOR UPDATE SKIP LOCKED, so a run is never picked twice. Keep a single api container: it runs the scheduler.
make logs # every servicedocker compose --profile prod logs -f workerPipeline run logs are files in the bizon_outputs volume, under logs/<pipeline_id>/<run_id>.log. Read them from the UI or GET /api/pipelines/runs/{run_id}/logs.
Use an external database
Section titled “Use an external database”Point the services’ DATABASE_URL at your Postgres and drop the db dependency:
DATABASE_URL: postgresql+asyncpg://user:password@db.example.com:5432/bizon_platformThe API runs the migrations on start.
Prebuilt images
Section titled “Prebuilt images”Compose builds images from the repository. CI also publishes multi-arch (amd64 and arm64) images on every push to main, tagged latest and sha-<short sha>:
ghcr.io/bizon-data/bizon-platform: API and worker. Start the worker withpython -m bizon_platform.worker.ghcr.io/bizon-data/bizon-platform-ui: nginx on port 8080. It proxies/apitohttp://api:8000.