split nextcloud chart components into separate files
This commit is contained in:
16
helm/nextcloud/templates/postgres-init-secret.yaml
Normal file
16
helm/nextcloud/templates/postgres-init-secret.yaml
Normal 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
|
||||
Reference in New Issue
Block a user