Docker Deployment¶
The default OpenSOAR deployment is Docker Compose based.
Services¶
The standard setup includes:
apiworkerpostgresredisuimigratefor schema upgrades during setup flows
Relevant Environment Variables¶
DATABASE_URL=postgresql+asyncpg://...
REDIS_URL=redis://...
CELERY_BROKER_URL=redis://...
PLAYBOOK_DIRS=/app/playbooks
JWT_SECRET=...
API_KEY_SECRET=...
Notes:
REDIS_URLis used as the default Celery result backend.CELERY_BROKER_URLcan be set separately when you want the worker queue transport on a different Redis DB or instance.
Volume Mounts¶
For local development, the default Compose setup mounts:
./srcinto the API and worker containers./playbooksinto/app/playbooks
That mount is what makes local playbook iteration possible.
Operational Notes¶
- restarting
apirefreshes in-process playbook discovery - restarting
workerensures execution uses the latest playbook code migrateis for Alembic schema migrations only- in the default root
docker-compose.yml,apiandworkerboth wait formigrateto complete successfully before they start JWT_SECRETandAPI_KEY_SECRETmust both be set to non-empty values or startup will fail fast
Production Advice¶
Treat playbooks like application code:
- version them in Git
- review them in pull requests
- deploy them alongside the services that execute them
- restart the relevant services in a controlled way
If you want a future “upload playbook” experience, that should be designed as an explicit product feature rather than inferred from the current Docker model.
Upgrade Procedure¶
For the packaged self-hosted path:
That keeps the migrate, api, worker, and ui images aligned during the upgrade.
For the root repository Compose path used by most local and single-host operators:
That path rebuilds the local migrate, api, worker, and ui images from the current checkout so schema and runtime changes move together.
Post-Upgrade Validation¶
After an upgrade:
- Confirm the API health endpoint returns
status: ok. - Check
docker compose psand confirmapi,worker,postgres, andredisare up. - Review
docker compose logs migrate api worker --tail 100. - Confirm API startup logs still show expected playbook discovery.
- Send a low-risk webhook test and confirm the worker still executes queued automation.
Backup and Rollback Guidance¶
- Back up Postgres before upgrades that may apply new Alembic revisions.
- Do not assume image rollback alone is safe after migrations have already run.
- If rollback is required after a migration, restore the database and keep
migrate,api, andworkeron the same application/plugin image set.