🎯 Goal
Run webpush-supervisor locally and validate end‑to‑end workflow execution.
🧰 Prerequisites
- Python 3.9+ (Poetry project)
- PostgreSQL
- Redis
- Kafka (optional, only for
SlackNotificationWorkflow) - access to external services (directory/manager/statistics/SSO) if real responses are needed
🐍 Local run (Poetry)
1) Select settings module
export DJANGO_SETTINGS_MODULE=conf.settings.local2) Install dependencies
poetry install3) Configure DB
conf/settings/local.py expects PostgreSQL database supervisor on localhost:5432.
4) Migrations and run Django
poetry run python manage.py migrate
poetry run python manage.py createsuperuser
poetry run python manage.py runserver 0.0.0.0:90005) Start workers and orchestrator
In separate terminals:
poetry run celery -A conf worker -l info
poetry run celery -A conf beat -l info
poetry run python manage.py run_workflow_starter
poetry run python manage.py run_workflow_dispatcher
run_workflow_starter— local consumer that executes LOCAL functions and the initial step.
run_workflow_dispatcher— orchestrator that advances the workflow to the next step.
6) Kafka consumer (optional)
For SlackNotificationWorkflow:
poetry run python manage.py run_kafka_consumer🐳 Docker Compose
The repository contains docker-compose.yml that starts:
supervisor(gunicorn, port 9000)db(PostgreSQL)redis
Run:
docker compose up
docker-compose.ymlreferences./resources/docker/supervisor/Dockerfile.
If the path does not exist, usebuild/resources/Dockerfileor update the path in the compose file.
✅ Quick check
- Open
/admin/and verify admin is accessible - Open
/api/docs/(Redoc) - Call
POST /api/v1/workflows/startwith any workflow - Fetch the result via
/api/v1/workflows/result