From 5587cf69dd375b0104ccfbd12639cc257a804536 Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Fri, 12 Apr 2024 14:07:51 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(helm)=20add=20command=20create=5Fd?= =?UTF-8?q?emo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We need to get dummy data in the system for the moment, it will insert a template for the PDF endpoint. We need to run this command after the migration is made. --- src/helm/env.d/dev/values.impress.yaml.gotmpl | 9 +++++++++ src/helm/env.d/staging/values.impress.yaml.gotmpl | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/src/helm/env.d/dev/values.impress.yaml.gotmpl b/src/helm/env.d/dev/values.impress.yaml.gotmpl index 98a881b2..7a7fe32f 100644 --- a/src/helm/env.d/dev/values.impress.yaml.gotmpl +++ b/src/helm/env.d/dev/values.impress.yaml.gotmpl @@ -38,6 +38,15 @@ backend: POSTGRES_PASSWORD: pass REDIS_URL: redis://default:pass@redis-master:6379/1 + migrate: + command: + - "/bin/sh" + - "-c" + - | + python manage.py migrate --no-input && + python manage.py create_demo --force + restartPolicy: Never + frontend: envVars: PORT: 8080 diff --git a/src/helm/env.d/staging/values.impress.yaml.gotmpl b/src/helm/env.d/staging/values.impress.yaml.gotmpl index 6fd20bfe..28805836 100644 --- a/src/helm/env.d/staging/values.impress.yaml.gotmpl +++ b/src/helm/env.d/staging/values.impress.yaml.gotmpl @@ -68,6 +68,15 @@ backend: name: redis.redis.libre.sh key: url + migrate: + command: + - "/bin/sh" + - "-c" + - | + python manage.py migrate --no-input && + python manage.py create_demo --force + restartPolicy: Never + frontend: image: repository: lasuite/impress-frontend