From e93bdedf880df741bf7b19f06a9bd588c97269b5 Mon Sep 17 00:00:00 2001 From: Xstar97TheNoob <9399967+xstar97@users.noreply.github.com> Date: Sat, 18 Feb 2023 15:12:38 -0500 Subject: [PATCH] fix(strapi) add docs to build admin panel (#7369) * fix(strapi) automatically build admin panel * fix command and added docs * replace init with args * replace arg command * remove initcontainer * yarn strapi * remove init and update docs. * update docs * remove extra args defaults * fix test value * remove comment * add yarn run build initContainers * update init initContainers * update * fix datbase host * update * update args * update command * replace npm with yarn * remove init container * update docs * update word --- charts/stable/strapi/Chart.yaml | 4 ++-- .../stable/strapi/docs/installation_notes.md | 22 +++++++++++++++++++ charts/stable/strapi/questions.yaml | 5 +++++ charts/stable/strapi/values.yaml | 17 +++++++------- 4 files changed, 38 insertions(+), 10 deletions(-) create mode 100644 charts/stable/strapi/docs/installation_notes.md diff --git a/charts/stable/strapi/Chart.yaml b/charts/stable/strapi/Chart.yaml index 63ba1faa14f..d07250e6495 100644 --- a/charts/stable/strapi/Chart.yaml +++ b/charts/stable/strapi/Chart.yaml @@ -25,9 +25,9 @@ sources: - https://hub.docker.com/r/naskio/strapi - https://truecharts.org/docs/charts/stable/strapi - https://github.com/naskio/docker-strapi -version: 8.0.29 +version: 8.0.30 annotations: truecharts.org/catagories: | - - media + - cms truecharts.org/SCALE-support: "true" truecharts.org/grade: U diff --git a/charts/stable/strapi/docs/installation_notes.md b/charts/stable/strapi/docs/installation_notes.md new file mode 100644 index 00000000000..5a3bf6cdada --- /dev/null +++ b/charts/stable/strapi/docs/installation_notes.md @@ -0,0 +1,22 @@ +# Installation Notes + +- Create a `Jwt Secret` to be used to signed the JWT for Users-Permissions plugin. +- Create a `Admin Jwt Secret` to be used to sign the JWT for the Admin panel. +- Set `App Keys` as a json array: + - `['keya', 'keyb']`. +- Set `Node Environment` to **Development** initially. +- Optionally set `Public URL` to a FDQN with https, ex: `https://api.example.com`. +- Optionally set `Strapi License` to activate the Enterprise Edition. +- Enable/Disable `Strapi Disable Update Notifications` for strapi update notifications. +- Enable/Disable `Fast Refresh` for react near-instant feedback. +- `Extra Args` can be left empty for the standard defaults or get args from [strapi-new](https://strapi.io/documentation/developer-docs/latest/developer-resources/cli/CLI.html#strapi-new). +- After the app is installed you might get a `Content Security Policy` error. To solve this you have to manually shell into the app. + + - Apps -> strapi -> 3 dot -> shell: + - run the following command to build the admin panel for v4: + + ```shell + npm run build + ``` + +- Restart the app after the command is ran successfully. diff --git a/charts/stable/strapi/questions.yaml b/charts/stable/strapi/questions.yaml index 86658668a5a..8c20c3364ea 100644 --- a/charts/stable/strapi/questions.yaml +++ b/charts/stable/strapi/questions.yaml @@ -60,6 +60,11 @@ questions: description: Production - value: development description: Development + - variable: PUBLIC_URL + label: Public URL + schema: + type: string + default: "" - variable: STRAPI_LICENSE label: Strapi License description: The license key to activate the Enterprise Edition. diff --git a/charts/stable/strapi/values.yaml b/charts/stable/strapi/values.yaml index c0aca97e98c..aa5c0b8bcb3 100644 --- a/charts/stable/strapi/values.yaml +++ b/charts/stable/strapi/values.yaml @@ -12,12 +12,13 @@ podSecurityContext: runAsGroup: 0 secretEnv: - JWT_SECRET: "my_jwt_secret" - ADMIN_JWT_SECRET: "my_admin_jwt_secret" - APP_KEYS: "my_app_keys" + JWT_SECRET: my_jwt_secret + ADMIN_JWT_SECRET: my_admin_jwt_secret + APP_KEYS: '["keya", "keyb"]' env: - DATABASE_CLIENT: "postgres" + PORT: "{{ .Values.service.main.ports.main.port }}" + DATABASE_CLIENT: postgres DATABASE_PORT: 5432 DATABASE_NAME: "{{ .Values.postgresql.postgresqlDatabase }}" DATABASE_HOST: @@ -30,7 +31,8 @@ env: name: dbcreds key: postgresql-password # STRAPI_LICENSE - NODE_ENV: "production" + # PUBLIC_URL + NODE_ENV: development STRAPI_DISABLE_UPDATE_NOTIFICATION: true FAST_REFRESH: false EXTRA_ARGS: "" @@ -40,17 +42,16 @@ service: ports: main: port: 1337 - targetPort: 1337 persistence: data: enabled: true - mountPath: "/srv/app" + mountPath: /srv/app # Enabled postgres postgresql: enabled: true - existingSecret: "dbcreds" + existingSecret: dbcreds postgresqlUsername: strapi postgresqlDatabase: strapi