TrueChartsClone/charts/stable/invidious/templates/_dbseed.tpl

43 lines
1.1 KiB
Smarty
Raw Normal View History

WIP feat(invidious) add invidious (#5103) * wip feat(invidious) add invidious * Update charts/incubator/invidious/templates/_config.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * Update charts/incubator/invidious/templates/_config.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * INVIDIOUS_CONFIG variable * Update charts/incubator/invidious/templates/_config.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * Update charts/incubator/invidious/templates/_config.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * Update charts/incubator/invidious/templates/_config.tpl Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> * formatted config * indent * fixes * Update charts/incubator/invidious/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/invidious/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/invidious/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/invidious/values.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * Update charts/incubator/invidious/questions.yaml Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> * fixes * add installContainers seeddb * add dbseed * dont run upgrade * fix vars * whops * simplify secret * meh upstream config is a single level everything * user accs * bg jobs * jobs * jobs * misc * moar * more * more * all * remoev todo * fix questions Signed-off-by: Xstar97 <Xstar97@users.noreply.github.com> Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros kois <s.kois@outlook.com>
2022-12-25 09:13:11 +00:00
{{- define "invidious.dbseed" -}}
image: "{{ .Values.ubuntuImage.repository }}:{{ .Values.ubuntuImage.tag }}"
env:
- name: POSTGRES_DB
value: {{ .Values.postgresql.postgresqlDatabase }}
- name: POSTGRES_USER
value: {{ .Values.postgresql.postgresqlUsername }}
{{/* PG* variables are for the psql client */}}
- name: PGPORT
value: "5432"
- name: PGHOST
valueFrom:
secretKeyRef:
name: dbcreds
key: plainhost
- name: PGPASSWORD
valueFrom:
secretKeyRef:
name: dbcreds
key: postgresql-password
command:
- /bin/sh
- -c
- |
echo "Starting DB Seed..."
mkdir -p invidious && cd invidious
echo "Fetching seed files..."
git init && \
git remote add invidious https://github.com/iv-org/invidious.git && \
git fetch invidious && \
# Fetch config and docker dirs
git checkout invidious/master -- docker config
# Move config into docker dir
echo "Preparing directory structure..."
mv -fv config docker
echo "Performing the seed..."
cd docker
./init-invidious-db.sh
{{- end -}}