nextcloud: preserve config merge and stop db reset
This commit is contained in:
parent
ff395f7cf2
commit
9d5ba6adfe
@ -7,7 +7,7 @@ metadata:
|
|||||||
data:
|
data:
|
||||||
extra.config.php: |
|
extra.config.php: |
|
||||||
<?php
|
<?php
|
||||||
$CONFIG = array (
|
$CONFIG = array_merge($CONFIG ?? array(), array (
|
||||||
'trusted_domains' =>
|
'trusted_domains' =>
|
||||||
array (
|
array (
|
||||||
0 => 'cloud.bstein.dev',
|
0 => 'cloud.bstein.dev',
|
||||||
@ -61,4 +61,4 @@ data:
|
|||||||
'oidc_login_create_groups' => false,
|
'oidc_login_create_groups' => false,
|
||||||
# External storage for user data should be configured to Asteria via the External Storage app (admin UI),
|
# 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.
|
# keeping the astreae PVC for app internals only.
|
||||||
);
|
));
|
||||||
|
|||||||
@ -23,40 +23,6 @@ spec:
|
|||||||
runAsUser: 33
|
runAsUser: 33
|
||||||
runAsGroup: 33
|
runAsGroup: 33
|
||||||
initContainers:
|
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
|
- name: fix-perms
|
||||||
image: alpine:3.20
|
image: alpine:3.20
|
||||||
command: ["/bin/sh", "-c"]
|
command: ["/bin/sh", "-c"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user