Files
axion1337.chat-gitops/apps/production/wikijs.yaml
T
Thore Cimbal 7164e4f61c feat(wiki): brand login page via mounted static assets (#0050)
Serve the ThreadNet logo and the shared platform login background (alpenglow.jpg,
same file Authentik and Element use) as public static files under
/_assets/img/branding, mounted from a single platform-branding ConfigMap. This
avoids two bad patterns: linking the background via an external URL (runtime
dependency on axion1337.chat) and uploading the logo as a gated Wiki.js asset
(which 404/403s on the unauthenticated login page unless guests get read:assets).

Wiki.js serves /wiki/assets publicly at /_assets, so mounted files need no
read:assets — guests stay locked out of pages. The config job sets logoUrl and
authLoginBgUrl to the local paths and enables dark mode as default. The ConfigMap
uses a name hash so a branding change rolls the pod. It can later be mounted into
Authentik/Element too, keeping one source of truth for the shared assets.
2026-08-13 12:00:00 +00:00

99 lines
2.7 KiB
YAML

# Wiki.js — Plattform-Wiki (ADR-0014, #0048). Öffentlich unter wiki.axion1337.chat
# (Ingress/Cert in wiki-ingress.yaml), Login nativ via Authentik-OIDC (#0049, Guide 10).
# Git-Storage (Inhalt in git) wird nach dem ersten Start in der Admin-UI eingerichtet.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: wikijs-data
namespace: matrix
spec:
accessModes:
- ReadWriteOnce
storageClassName: local-path
resources:
requests:
storage: 2Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: wikijs
namespace: matrix
spec:
replicas: 1
strategy:
type: Recreate # RWO-Volume (Git-Storage-Klon)
selector:
matchLabels:
app.kubernetes.io/name: wikijs
template:
metadata:
labels:
app.kubernetes.io/name: wikijs
spec:
containers:
- name: wikijs
image: ghcr.io/requarks/wiki:2.5
ports:
- name: http
containerPort: 3000
env:
- name: DB_TYPE
value: postgres
- name: DB_HOST
value: wikijs-postgres
- name: DB_PORT
value: "5432"
- name: DB_NAME
value: wiki
- name: DB_USER
valueFrom:
secretKeyRef:
name: wikijs-postgres-secret
key: username
- name: DB_PASS
valueFrom:
secretKeyRef:
name: wikijs-postgres-secret
key: password
volumeMounts:
- name: data
mountPath: /wiki/data
# Branding-Assets (Logo + Login-Hintergrund) als statische Dateien in den
# öffentlichen /_assets-Baum (express.static /wiki/assets). Dadurch ohne
# read:assets erreichbar (Guests bleiben gesperrt) und ohne externe URL —
# eine Quelle (ConfigMap platform-branding), Config zeigt auf /_assets/img/branding/.
- name: branding
mountPath: /wiki/assets/img/branding
readOnly: true
readinessProbe:
tcpSocket:
port: http
initialDelaySeconds: 25
periodSeconds: 10
livenessProbe:
tcpSocket:
port: http
initialDelaySeconds: 60
periodSeconds: 20
volumes:
- name: data
persistentVolumeClaim:
claimName: wikijs-data
- name: branding
configMap:
name: platform-branding
---
apiVersion: v1
kind: Service
metadata:
name: wikijs
namespace: matrix
spec:
selector:
app.kubernetes.io/name: wikijs
ports:
- name: http
port: 3000
targetPort: http