split nextcloud chart components into separate files

This commit is contained in:
2023-10-03 09:20:46 -04:00
parent f77bc1567f
commit b16f948571
18 changed files with 368 additions and 393 deletions

View File

@@ -0,0 +1,16 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-postgres-init
annotations:
{{- include "helm_keep_annotation" . | nindent 4 }}
stringData:
init-user-db.sh: |
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER nextcloud PASSWORD '{{ include "POSTGRES_PASSWORD" . | b64dec }}';
GRANT ALL PRIVILEGES ON DATABASE nextcloud TO nextcloud;
GRANT USAGE, CREATE ON SCHEMA public TO nextcloud;
EOSQL