wait for postgresql to start before starting authelia

This commit is contained in:
kjeld Schouten-Lebbing
2021-09-01 17:42:27 +02:00
parent 03dbc94b1f
commit 83342af6ae
3 changed files with 17 additions and 1 deletions
+15
View File
@@ -19,6 +19,21 @@ service:
main:
port: 9091
initContainers:
- name: init-postgresdb
image: postgres:13.1
command:
- "sh"
- "-c"
- "until pg_isready -U authelia -h ${pghost} ; do sleep 2 ; done"
imagePullPolicy: IfNotPresent
env:
- name: pghost
valueFrom:
secretKeyRef:
name: dbcreds
key: plainhost
persistence:
config:
enabled: true