coredns-web-ui deployment

This commit is contained in:
bryanpedini committed 2026-11-20 14:54:44 +01:00
commit 07d2e544dd
5 files changed
+126

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
# coredns-web-ui Deployment
Web UI for the zones and records CoreDNS serves through the `mysql` plugin: [source/coredns-web-ui](https://git.bjphoster.com/source/coredns-web-ui).
It reads and writes the plugin's records table directly and keeps its own tables (users, sessions, delegations, audit) in the same database with the `<prefix>webui_` prefix, created by its migrations at startup. It never talks to CoreDNS. It keeps no local state and needs no volume. `/health` is an unauthenticated liveness check; HSTS is left to Træfik.
## Requirements
- MySQL 8 (the connection uses the `utf8mb4_0900_ai_ci` collation) holding the plugin's `<prefix>records` table. The application never creates or alters it.
- A dedicated database user with the least-privilege grants listed in the [source README](https://git.bjphoster.com/source/coredns-web-ui#mysql-grants). `DB_TABLE_PREFIX` must match the plugin's `table_prefix`.
## Usage
```sh
cp env.example .env
# edit .env
docker compose up -d
```
`TRUSTED_PROXIES` must cover the Træfik network, otherwise sessions and audit rows record Træfik's address as the client origin.
Create the first admin from the running container, then manage the other users from the web UI:
```sh
printf '%s\n' "$PASSWORD" | docker compose exec -T coredns-web-ui /app user add <username> admin
```
Other CLI commands (`user`, `check`, `audit`, `version`) run the same way:
```sh
docker compose exec coredns-web-ui /app help
```
## Update
Set `COREDNS_WEBUI_VERSION` in `.env`, then:
```sh
docker compose pull
docker compose up -d
```