fix: add startup command in nextgen chart to ensure data directory and DB initialization

This commit is contained in:
fchinembiri 2026-07-11 19:27:26 +02:00
parent d524b00271
commit 175bd6b1ca
1 changed files with 5 additions and 0 deletions

View File

@ -19,9 +19,14 @@ spec:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
command:
- sh
- -c
- "mkdir -p /app/data && ([ -f /app/data/school.db ] || node src/database/init.js) && node src/index.js"
ports: ports:
- name: http - name: http
containerPort: {{ .Values.service.port }} containerPort: {{ .Values.service.port }}
protocol: TCP protocol: TCP
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}