diff --git a/services/comms/helmrelease.yaml b/services/comms/helmrelease.yaml index 10554b6..4456348 100644 --- a/services/comms/helmrelease.yaml +++ b/services/comms/helmrelease.yaml @@ -383,16 +383,14 @@ spec: participant_limit: 16 brand: Othrys Call extraVolumes: - - name: element-config-host + - name: element-host-config configMap: - name: othrys-element-element-web - items: - - key: config.json - path: config.live.bstein.dev.json + name: othrys-element-host-config + defaultMode: 0555 extraVolumeMounts: - - name: element-config-host - mountPath: /tmp/element-web-config/config.live.bstein.dev.json - subPath: config.live.bstein.dev.json + - name: element-host-config + mountPath: /docker-entrypoint.d/20-host-config.sh + subPath: 20-host-config.sh readOnly: true ingress: diff --git a/services/comms/kustomization.yaml b/services/comms/kustomization.yaml index 9171b6b..3360067 100644 --- a/services/comms/kustomization.yaml +++ b/services/comms/kustomization.yaml @@ -63,6 +63,11 @@ configMapGenerator: - bot.py=scripts/atlasbot/bot.py options: disableNameSuffixHash: true + - name: othrys-element-host-config + files: + - 20-host-config.sh=scripts/element-host-config.sh + options: + disableNameSuffixHash: true - name: atlas-kb files: - INDEX.md=knowledge/INDEX.md diff --git a/services/comms/scripts/element-host-config.sh b/services/comms/scripts/element-host-config.sh new file mode 100644 index 0000000..6f381a9 --- /dev/null +++ b/services/comms/scripts/element-host-config.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +set -euo pipefail + +HOST_CONFIG="/tmp/element-web-config/config.live.bstein.dev.json" +BASE_CONFIG="/tmp/element-web-config/config.json" + +if [[ -f "$BASE_CONFIG" ]]; then + cp -f "$BASE_CONFIG" "$HOST_CONFIG" +fi