Prefix web UI deployment variables with CWUI

This commit is contained in:
bryanpedini committed 2026-11-20 19:18:06 +01:00
1 parent 097e4bb35c
commit a66b48545b
3 files changed
+31 -31

No files matched your search

+3 -3
View File
@@ -5,7 +5,7 @@ It reads and writes the plugin's records table directly and keeps its own tables
## Requirements
- MySQL or MariaDB with a `utf8mb4` database 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`.
- A dedicated database user with the least-privilege grants listed in the [source README](https://git.bjphoster.com/source/coredns-web-ui#mysql-grants). `CWUI_DB_TABLE_PREFIX` must match the plugin's `table_prefix`.
## Usage
```sh
@@ -14,7 +14,7 @@ cp env.example .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.
`CWUI_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
@@ -27,7 +27,7 @@ docker compose exec coredns-web-ui /app help
```
## Update
Set `COREDNS_WEBUI_VERSION` in `.env`, then:
Set `CWUI_VERSION` in `.env`, then:
```sh
docker compose pull
docker compose up -d
+14 -14
View File
@@ -1,25 +1,25 @@
---
services:
coredns-web-ui:
image: git.bjphoster.com/source/coredns-web-ui:${COREDNS_WEBUI_VERSION}
image: git.bjphoster.com/source/coredns-web-ui:${CWUI_VERSION}
restart: unless-stopped
stop_grace_period: 30s
environment:
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=${DB_NAME}
- DB_TLS=${DB_TLS}
- DB_TABLE_PREFIX=${DB_TABLE_PREFIX}
- DB_HOST=${CWUI_DB_HOST}
- DB_PORT=${CWUI_DB_PORT}
- DB_USER=${CWUI_DB_USER}
- DB_PASSWORD=${CWUI_DB_PASSWORD}
- DB_NAME=${CWUI_DB_NAME}
- DB_TLS=${CWUI_DB_TLS}
- DB_TABLE_PREFIX=${CWUI_DB_TABLE_PREFIX}
- HTTP_ADDR=0.0.0.0
- HTTP_PORT=${TRAEFIK_SERVICE_PORT}
- LOG_LEVEL=${LOG_LEVEL}
- APP_NAME=${APP_NAME}
- COOKIE_SECURE=${COOKIE_SECURE}
- SESSION_IDLE_TIMEOUT=${SESSION_IDLE_TIMEOUT}
- SESSION_MAX_AGE=${SESSION_MAX_AGE}
- TRUSTED_PROXIES=${TRUSTED_PROXIES}
- LOG_LEVEL=${CWUI_LOG_LEVEL}
- APP_NAME=${CWUI_APP_NAME}
- COOKIE_SECURE=${CWUI_COOKIE_SECURE}
- SESSION_IDLE_TIMEOUT=${CWUI_SESSION_IDLE_TIMEOUT}
- SESSION_MAX_AGE=${CWUI_SESSION_MAX_AGE}
- TRUSTED_PROXIES=${CWUI_TRUSTED_PROXIES}
labels:
### Section Træfik
- traefik.enable=${TRAEFIK_ENABLED}
+14 -14
View File
@@ -10,18 +10,18 @@ TRAEFIK_CERTRESOLVER=letsencrypt
TRAEFIK_MIDDLEWARES=hsts
# coredns-web-ui
COREDNS_WEBUI_VERSION=0.0.1-alpha3
DB_HOST=mysql.example.com
DB_PORT=3306
DB_USER=coredns_webui
DB_PASSWORD=changeme
DB_NAME=coredns
DB_TLS=false
DB_TABLE_PREFIX=coredns_
LOG_LEVEL=INFO
APP_NAME=CoreDNS Web UI
COOKIE_SECURE=true
SESSION_IDLE_TIMEOUT=1h
SESSION_MAX_AGE=12h
CWUI_VERSION=0.0.1-alpha3
CWUI_DB_HOST=mysql.example.com
CWUI_DB_PORT=3306
CWUI_DB_USER=coredns_webui
CWUI_DB_PASSWORD=changeme
CWUI_DB_NAME=coredns
CWUI_DB_TLS=false
CWUI_DB_TABLE_PREFIX=coredns_
CWUI_LOG_LEVEL=INFO
CWUI_APP_NAME=CoreDNS Web UI
CWUI_COOKIE_SECURE=true
CWUI_SESSION_IDLE_TIMEOUT=1h
CWUI_SESSION_MAX_AGE=12h
# CIDR of the Træfik network, so the client address comes from X-Forwarded-For
TRUSTED_PROXIES=172.16.0.0/12
CWUI_TRUSTED_PROXIES=172.16.0.0/12