move migrate and static file setup to init container from docker entrypoint
This commit is contained in:
parent
e47a77a32e
commit
17ef031e43
3 changed files with 25 additions and 10 deletions
|
|
@ -46,9 +46,15 @@ spec:
|
|||
imagePullSecrets:
|
||||
- name: registry-credentials
|
||||
initContainers:
|
||||
- name: pleroma-static-files
|
||||
image: cr.forge.lan/darkdork-dev/pleroma
|
||||
command: [ "sh", "-c", "mkdir -p ${DATA}/uploads && mkdir -p ${DATA}/static && cp -rf /static-files/* ${DATA}/static" ]
|
||||
- name: pleroma-migrate
|
||||
image: cr.forge.lan/darkdork-dev/pleroma
|
||||
command: [ "sh", "-c", "$HOME/bin/pleroma_ctl migrate" ]
|
||||
- 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;"]
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue