Add the hosting account administration foundation

This commit is contained in:
parkel committed 2026-11-19 21:08:13 +01:00
1 parent c5bcd9eb4d
commit 695c8ed212
14 files changed
+330

No files matched your search

+45
View File
@@ -0,0 +1,45 @@
# Local development
Use Python 3.12 or later. From the repository root, install the panel and its
development tools in a virtual environment.
```sh
python3 -m venv .venv
. .venv/bin/activate
python -m pip install -e '.[dev]'
export COULOBRE_SECRET_KEY="$(python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())')"
export COULOBRE_DEBUG=1
python manage.py migrate
python manage.py createsuperuser
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.
The local database defaults to `db.sqlite3`. Set `COULOBRE_SQLITE_PATH` to use a
different file. Keep `COULOBRE_DEBUG` for local development.
## MariaDB
Create a dedicated MariaDB database and application user. Install the MariaDB or
MySQL client headers, Python headers, a C compiler, and `pkg-config`, then add
the database driver with `python -m pip install -e '.[dev,mariadb]'`.
Set `COULOBRE_DB_NAME`, `COULOBRE_DB_USER`, and `COULOBRE_DB_PASSWORD` for your
database and rerun `python manage.py migrate`. Set `COULOBRE_DB_HOST` and
`COULOBRE_DB_PORT` if the database uses a different address from `127.0.0.1:3306`.
## Checks
```sh
ruff check .
ruff format --check .
python manage.py check
python manage.py makemigrations --check --dry-run
python manage.py test coulobre
git diff --check
```