Add queued Apache configuration previews

Persist preview requests before dispatch and render them with Celery and RabbitMQ.
Show completed previews in Django admin and document the grouped PR workflow.
This commit is contained in:
parkel committed 2026-11-19 21:18:37 +01:00
1 parent 695c8ed212
commit 84d94f7efa
14 files changed
+313 -5

No files matched your search

+26 -2
View File
@@ -17,12 +17,36 @@ python manage.py runserver
Open <http://127.0.0.1:8000/admin/> and sign in with the administrator account.
Under **Hosting accounts**, select **Add hosting account** and enter a name
and a primary domain such as `example.org`. The account is stored in the panel
database. Applying the account to Apache and the other hosting services is
planned for a later development step.
database.
The local database defaults to `db.sqlite3`. Set `COULOBRE_SQLITE_PATH` to use a
different file. Keep `COULOBRE_DEBUG` for local development.
## Request an Apache configuration preview
Start RabbitMQ and set `COULOBRE_BROKER_URL` to its AMQP URL. The development
default is `amqp://guest:guest@127.0.0.1:5672//`. Use the same database and
broker settings for the panel, worker, and scheduler.
In separate terminals with the virtual environment active, start a worker
and a scheduler. Use one worker process with SQLite.
```sh
celery -A coulobre worker --pool=solo
celery -A coulobre beat
```
Select an account in **Hosting accounts** and run **Request Apache plans**.
Open **Web provisioning plans** to see the request and its configuration once
the worker finishes. Each request captures the primary domain at queue time.
The preview references the future document root and PHP-FPM socket for the
account. Preview generation makes no changes to the hosting services.
The panel stores requests in its database before the scheduler publishes work
to RabbitMQ. After a broker outage, queued requests resume when the worker and
scheduler reconnect. Plans that remain incomplete five minutes after dispatch
are eligible for delivery again.
## MariaDB
Create a dedicated MariaDB database and application user. Install the MariaDB or