🎯 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.local

2) Install dependencies

poetry install

3) 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:9000

5) 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.yml references ./resources/docker/supervisor/Dockerfile.
If the path does not exist, use build/resources/Dockerfile or update the path in the compose file.

✅ Quick check

  1. Open /admin/ and verify admin is accessible
  2. Open /api/docs/ (Redoc)
  3. Call POST /api/v1/workflows/start with any workflow
  4. Fetch the result via /api/v1/workflows/result

0 items under this folder.