๐ฏ Goal
This section explains how to run the service locally and execute CommandRequest end-to-end.
๐งฐ Prerequisites
- Python (Poetry-managed dependencies)
- PostgreSQL and Redis
- Playwright Chromium
If you use Docker, Chromium and system dependencies are already included in the Docker image.
๐ณ Local run with Docker Compose
The gsc-gui-tools repository contains docker-compose.yml which starts:
web(Django + Gunicorn)celery_workercelery_scheduler(Celery Beat)command_request_starter(management command that dispatches NEW requests)db(Postgres)redis
๐๏ธ 1) Build the image
docker-compose.yml references image gsc-gui-tools-v1, so build it first:
docker build -t gsc-gui-tools-v1 .โถ๏ธ 2) Start the stack
docker compose upAfter startup:
- Web:
http://localhost:8000/ - Admin:
http://localhost:8000/admin/ - API docs:
http://localhost:8000/api/docs/
๐ฅ๏ธ 3) VNC (watch the browser UI)
The celery_worker container runs a VNC server to help debug Playwright automation.
- In Docker Compose, VNC is exposed on host port 5901 (mapped to container port 5900).
- The VNC password is currently hardcoded in scripts/Dockerfile โ change it before using this setup outside local development.
๐ Run without Docker (Poetry)
โ๏ธ Settings module
For local development (DB/Redis on localhost) use config.local_settings:
export DJANGO_SETTINGS_MODULE=config.local_settings๐ Web (Django)
poetry install
poetry run python manage.py migrate
poetry run python manage.py createsuperuser
poetry run python manage.py runserver๐งต Workers / scheduler
Run these in separate terminals:
poetry run celery -A config worker --loglevel=info
poetry run celery -A config beat --loglevel=info
poetry run python manage.py command_request_starterโ How to verify
- Create an
Accountin Admin - Create a
CommandRequest(via API or Admin) - Ensure
command_request_starterdispatches the task - Ensure
celery_workerexecutes it andstatusbecomesCOMPLETEDorFAILED - If
callback_urlwas set, ensure a callback is sent