mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-30 13:35:10 +02:00
First, thanks a LOT @rouja for your help along the way. This commit propose a first draft of Helm chart to prepare deployment. It follows Plane's Helm Chart, hosted on the shared team repo, please https://github.com/numerique-gouv/helm-charts, PR #11 It offers advanced templating function under _helpers.tpl, an auto-generated README file when running ./generate-readme.sh, and a clear files structure. The chart itself is quite simple. We have two deployments, one for the frontend and one for the backend. Both need a dedicated service, which are exposed using a common ingress. Frontend is accessible from the / path and backend's from /api path. Please note, we added a backend job to migrate the database when deploying backend's pods. This job should be auto-cleaning itself 100s after it completes to avoid any error when syncing helm. values.yaml file is quite pristine, all common env variables will be set in helmfile configuration. Deploying frontend static files through kubernetes is temporary, we plan to either remplace it by an external CDN or use minio to host static output in a S3 bucket within the cluster.
11 lines
477 B
Bash
Executable File
11 lines
477 B
Bash
Executable File
#!/bin/bash
|
|
|
|
docker image ls | grep readme-generator-for-helm
|
|
if [ "$?" -ne "0" ]; then
|
|
git clone https://github.com/bitnami/readme-generator-for-helm.git /tmp/readme-generator-for-helm
|
|
cd /tmp/readme-generator-for-helm
|
|
docker build -t readme-generator-for-helm:latest .
|
|
cd $(dirname -- "${BASH_SOURCE[0]}")
|
|
fi
|
|
docker run --rm -it -v ./values.yaml:/app/values.yaml -v ./README.md:/app/README.md readme-generator-for-helm:latest readme-generator -v values.yaml -r README.md
|