From 83607128d77bdf6ba08c4436be4943dd506361a7 Mon Sep 17 00:00:00 2001 From: levivannoort Date: Sun, 1 Dec 2024 20:36:11 +0100 Subject: [PATCH] chore: add option to manually specify migration container command --- server/Chart.yaml | 2 +- server/templates/deployment.yaml | 2 +- server/values.yaml | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/server/Chart.yaml b/server/Chart.yaml index 920df41..78d203b 100644 --- a/server/Chart.yaml +++ b/server/Chart.yaml @@ -3,7 +3,7 @@ name: server description: A Helm chart for the server component of Amplication type: application -version: 2.0.10 +version: 2.0.11 appVersion: "0.0.0" sources: diff --git a/server/templates/deployment.yaml b/server/templates/deployment.yaml index f01732e..f6588e2 100644 --- a/server/templates/deployment.yaml +++ b/server/templates/deployment.yaml @@ -39,7 +39,7 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} command: ["/bin/sh"] - args: ["-c", "npx prisma migrate deploy --schema prisma/schema.prisma", ";", "exit"] + args: ["-c", {{ .Values.initContainer.args | quote }}, ";", "exit"] env: - name: POSTGRESQL_URL valueFrom: diff --git a/server/values.yaml b/server/values.yaml index 7f536a9..ff6ee77 100644 --- a/server/values.yaml +++ b/server/values.yaml @@ -162,6 +162,10 @@ strategy: maxUnavailable: 0 type: RollingUpdate +## Configuration for specifying a differenct command to execute schema migrations +initContainer: + args: "npx prisma@5.10.2 migrate deploy --schema prisma/schema.prisma" + ## @param cronJob.graphql.enabled Whether to enable the graphql cronjob ## @param cronJob.graphql.schedule The unix style cronjob timer ## @param cronJob.graphql.history.successful Determine how many successful jobs to keep