This commit is contained in:
Joakim Hellsén 2026-04-27 20:43:26 +02:00
commit a7a5b5c8ea
Signed by: Joakim Hellsén
SSH key fingerprint: SHA256:/9h/CsExpFp+PRhsfA0xznFx2CGfTT5R/kpuFfUgEQk
43 changed files with 5531 additions and 9 deletions

View file

@ -37,4 +37,26 @@ uv run python manage.py check
uv run pytest -n 5 -q
uv run ruff check . --fix
uv run ruff format .
# Start Celery workers
uv run celery -A config worker -l info
```
### 4 Local test deployment flow
Set `DJANGO_SECRET_KEY` before running Django management commands.
```bash
export DJANGO_SECRET_KEY="dev-only-secret"
uv run python manage.py create_test_deployment
```
The command creates a randomized tenant and hosted site, provisions PostgreSQL and Redis test containers,
builds a reusable local Django test image, and prints a localhost sentinel URL when the deployment reaches
`running`.
Open `/` or `/deployments/` in the Django web UI to inspect recent deployments, runtime service states,
live sentinel health, and the latest captured Podman log snapshots for Django, PostgreSQL, and Redis.
Use `--no-wait` only when you have a real cross-process Celery broker configured through
`TUSSILAGO_CELERY_BROKER_URL` and a worker process running. `memory://` is not valid for this mode because a
separate worker cannot consume in-memory tasks from another process.