mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Add db-migrations-job, not working yet
This commit is contained in:
parent
a74abbb053
commit
c3548e5d8d
@ -26,10 +26,6 @@ spec:
|
||||
- name: backend
|
||||
image: humanconnection/nitro-backend:latest
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
lifecycle:
|
||||
postStart:
|
||||
exec:
|
||||
command: ["/bin/sh", "-c", "{{ .Values.application.initializeCommand }}", "&&", "{{ .Values.application.migrationsCommand }}"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ .Release.Name }}-configmap
|
||||
|
||||
@ -0,0 +1,23 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-db-migrations
|
||||
annotations:
|
||||
"helm.sh/hook": post-upgrade
|
||||
"helm.sh/hook-weight": "0"
|
||||
"helm.sh/hook-delete-policy": hook-succeeded, hook-failed
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
spec:
|
||||
restartPolicy: Never
|
||||
containers:
|
||||
- name: db-migrations-job
|
||||
image: humanconnection/nitro-backend:latest
|
||||
command: ["/bin/sh", "-c", "{{ .Values.application.migrationsCommand }}"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ .Release.Name }}-configmap
|
||||
- secretRef:
|
||||
name: {{ .Release.Name }}-secrets
|
||||
Loading…
x
Reference in New Issue
Block a user