From deef9897338443b540ee7d555d5c12fb094d0fad Mon Sep 17 00:00:00 2001 From: Julien Bouquillon Date: Sat, 29 Jul 2023 00:38:59 +0200 Subject: [PATCH] docs: add faq (#376) --- docs/faq.md | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/docs/faq.md b/docs/faq.md index a387130dd4..deefca65fe 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -1,6 +1,6 @@ # FAQ -[Add your question](https://github.com/SocialGouv/kontinuous/issues/new?title=docs:%20add%20FAQ%20entry) +[Add your question](https://github.com/SocialGouv/kontinuous/edit/master/docs/faq.md) ## Why another CI/CD ? @@ -83,6 +83,40 @@ app: name: pg-xxx-app ``` +## Run a seed job + +This example build your Dockerfile, creates a PG cluster, seed the database then starts your application with secrets attached + +In your `.kontinuous/values.yaml` or `.kontinuous/[env]/values.yaml` + +```yaml +# create app database +pg: + ~chart: pg + +# run app after build and seed +app: + ~chart: app + ~needs: [build-app, seed-db] + # use CNPG db created secret + envFrom: + - secretRef: + name: pg-app + +jobs: + runs: + # builds Dockerfile + build-app: + use: build + # seed the database + seed-db: + use: seed-db + ~needs: [pg] + pgSecretName: pg-app + with: + seedPath: ./seeds.sql +``` + ## Add a custom HELM chart To add a custom HELM chart to your deployment :