move database ready check into init container
This commit is contained in:
parent
64dc13b3ad
commit
ea4bd5e94d
2 changed files with 12 additions and 3 deletions
|
|
@ -45,6 +45,17 @@ spec:
|
|||
spec:
|
||||
imagePullSecrets:
|
||||
- name: registry-credentials
|
||||
initContainers:
|
||||
- name: pleroma-database-wait
|
||||
image: cr.forge.lan/darkdork-dev/pleroma
|
||||
command: ["sh", "-c", "while ! pg_isready -U ${DB_USER} -d postgres://${DB_HOST}:${DB_PORT}/${DB_NAME} -t 1; do sleep 1s; done;"]
|
||||
env:
|
||||
- name: DB_HOST
|
||||
value: postgres
|
||||
- name: DB_NAME
|
||||
value: pleroma
|
||||
- name: DB_USER
|
||||
value: pleroma
|
||||
containers:
|
||||
- name: pleroma
|
||||
image: cr.forge.lan/darkdork-dev/pleroma
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue