nextcloud: preserve config merge and stop db reset
This commit is contained in:
parent
ff395f7cf2
commit
9d5ba6adfe
@ -7,7 +7,7 @@ metadata:
|
||||
data:
|
||||
extra.config.php: |
|
||||
<?php
|
||||
$CONFIG = array (
|
||||
$CONFIG = array_merge($CONFIG ?? array(), array (
|
||||
'trusted_domains' =>
|
||||
array (
|
||||
0 => 'cloud.bstein.dev',
|
||||
@ -61,4 +61,4 @@ data:
|
||||
'oidc_login_create_groups' => false,
|
||||
# External storage for user data should be configured to Asteria via the External Storage app (admin UI),
|
||||
# keeping the astreae PVC for app internals only.
|
||||
);
|
||||
));
|
||||
|
||||
@ -23,40 +23,6 @@ spec:
|
||||
runAsUser: 33
|
||||
runAsGroup: 33
|
||||
initContainers:
|
||||
- name: db-reset
|
||||
image: postgres:16-alpine
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
set -e
|
||||
mkdir -p /var/www/html/config
|
||||
if [ ! -f /var/www/html/config/.db_initialized ]; then
|
||||
rm -f /var/www/html/config/config.php || true
|
||||
psql "host=${POSTGRES_HOST} user=${POSTGRES_USER} password=${POSTGRES_PASSWORD} dbname=${POSTGRES_DB}" -v ON_ERROR_STOP=1 -c "DROP SCHEMA IF EXISTS public CASCADE; CREATE SCHEMA public; GRANT ALL ON SCHEMA public TO PUBLIC;"
|
||||
touch /var/www/html/config/.db_initialized
|
||||
chown 33:33 /var/www/html/config/.db_initialized || true
|
||||
fi
|
||||
env:
|
||||
- name: POSTGRES_HOST
|
||||
value: postgres-service.postgres.svc.cluster.local
|
||||
- name: POSTGRES_DB
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: nextcloud-db
|
||||
key: database
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: nextcloud-db
|
||||
key: db-username
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: nextcloud-db
|
||||
key: db-password
|
||||
volumeMounts:
|
||||
- name: nextcloud-config-pvc
|
||||
mountPath: /var/www/html/config
|
||||
- name: fix-perms
|
||||
image: alpine:3.20
|
||||
command: ["/bin/sh", "-c"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user