Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: better init strapi #192

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 26 additions & 9 deletions .kontinuous/env/dev/values.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
api:
annotations:
oblik.socialgouv.io/min-limit-cpu: "2"
cmd: true
args:
- sh
- -c
- "yarn strapi import --force -f seed-data.tar.gz && yarn start"
~preDeploy.cleaner:
match:
kind: Deployment
Expand All @@ -20,13 +13,37 @@ api:
# so public cannot be a volume, it must be its parent
# see https://github.com/strapi/strapi/issues/17809
initContainers:
- name: move-public-to-volume
- name: import-and-prepare
image:
"{{ .Values.global.registry }}/{{ .Values.global.projectName }}/{{
.Values.global.imageRepository }}/api:{{ .Values.global.imageTag }}"
command: ["/bin/sh", "-c"]
args:
- cp -r public/. /mnt/public;
- |
yarn strapi import --force -f seed-data.tar.gz && \
cp -r public/. /mnt/public
volumeMounts:
- name: public
mountPath: /mnt/public
envFrom:
- secretRef:
name: pg-app
- secretRef:
name: api
env:
- name: DATABASE_HOST
value: "$(PGHOST)"
- name: DATABASE_PORT
value: "$(PGPORT)"
- name: DATABASE_NAME
value: "$(PGDATABASE)"
- name: DATABASE_USERNAME
value: "$(PGUSER)"
- name: DATABASE_PASSWORD
value: "$(PGPASSWORD)"
- name: HOST
value: "0.0.0.0"
- name: PORT
value: "1337"
- name: DATABASE_CLIENT
value: postgres
Loading