Files
computer-playbook/roles/web-app-kix/meta/volumes.yml
kevinveenbirkenbachandClaude Opus 5 8986b21270 fix(kix): keep the backend config so a recreated container stops reinstalling
compose gave up on `dependency failed to start: container kix-backend is unhealthy`,
and the backend's own log names the reason:

    psql -q -h postgres -p 5432 -U kix kix -c 'CREATE EXTENSION ...'   -> succeeds
    /opt/kix/bin/kix.Console.pl Maint::Config::Rebuild --allow-root    -> FATAL:
        password authentication failed for user "kix"

Two calls in a row, one working and one not, with the same database. psql takes its
password from PGPASSWORD; the perl layer takes it from /opt/kix/config/01main, and the
entrypoint's own `[ ! -f /opt/kix/config/01main ]` test reports that file missing on
every start.

/opt/kix/config was on no volume. Every recreated container therefore loses 01main,
re-enters the first-install path, and runs it against a database that is already
installed. The credential rotation between the sync and the async pass is only what
made the container get recreated; any redeploy does this.

Everything else was ruled out from the run rather than assumed: the ALTER USER landed
(changed: true, 22:18:44), the rendered env carried the same value (22:18:57), there is
exactly one postgres container and 192.168.200.2 is its address, and it stayed up and
healthy across the whole window.

Persisting the directory alone would trade one failure for another: the entrypoint runs
`ln -s '/opt/kix/conf.d/*' /opt/kix/config/` on every start, unquoted-glob-style but with
the glob quoted, so it creates a single dangling link named `*` -- and the second start
would find it there. The link points at a path with a literal asterisk and nothing reads
it, so clear_stale_conf_link.yml removes it on every node before the stack comes up.

The password patch declaration follows the friendica pattern and needs 2c4e0e18b to work
at all: its groups are extended-regex, which basic-regex sed rejected outright.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 15:58:55 +02:00

64 lines
1.3 KiB
YAML

---
kix_config:
type: volume
name: kix_kix_config
nfs:
uid: "110010100"
gid: "110010100"
mode: "0770"
mounts:
- service: backend
target: /opt/kix/config
kix_shared:
type: volume
name: kix_kix_shared
nfs:
uid: "110010100"
gid: "110010100"
mode: "0770"
mounts:
- service: backend
target: &mnt_shared_target /mnt/shared
- service: frontend
target: *mnt_shared_target
kix_backend:
type: volume
name: kix_kix_backend
nfs:
uid: "110010100"
gid: "110010100"
mode: "0770"
mounts:
- service: backend
target: &mnt_data_target /mnt/data
kix_frontend:
type: volume
name: kix_kix_frontend
nfs:
uid: "110010100"
gid: "110010100"
mode: "0770"
mounts:
- service: frontend
target: *mnt_data_target
auth_ldap:
type: config
source: "{{ [lookup('container', 'web-app-kix', 'directories.volumes'), 'auth_ldap.xml'] | path_join }}"
mode: "0444"
mounts:
- service: backend
target: /opt/kix/Kernel/Config/Files/zzz_auth_ldap.xml
when: "{{ lookup('config', 'web-app-kix', 'services.ldap.enabled') | bool }}"
proxy_nginx_conf:
type: config
source: "{{ [lookup('container', 'web-app-kix', 'directories.volumes'), 'kix-proxy.default.conf'] | path_join }}"
mode: "0444"
mounts:
- service: proxy
target: /etc/nginx/conf.d/default.conf