From aabfe1cb472d0138e354fea1a2880d83a21eefc2 Mon Sep 17 00:00:00 2001 From: Eduard Tamsa Date: Mon, 6 Nov 2023 02:07:41 +0200 Subject: [PATCH] Add config --- helm/service/templates/sammwise.yaml | 3 +++ helm/service/values.yaml | 1 + next.config.js | 9 +++++---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/helm/service/templates/sammwise.yaml b/helm/service/templates/sammwise.yaml index 540e4d4..6215518 100644 --- a/helm/service/templates/sammwise.yaml +++ b/helm/service/templates/sammwise.yaml @@ -19,6 +19,9 @@ spec: env: - name: NEXT_PUBLIC_BASE_PATH value: {{ .Values.sammwise.NEXT_PUBLIC_BASE_PATH | quote }} + - name: RANCHER_SERVER + value: {{ .Values.sammwise.RANCHER_SERVER | quote }} + # {{- end }} --- apiVersion: v1 diff --git a/helm/service/values.yaml b/helm/service/values.yaml index 7211a59..bac9fa1 100644 --- a/helm/service/values.yaml +++ b/helm/service/values.yaml @@ -6,6 +6,7 @@ sammwise: image: sjultra/sammwise:latest # port: 80 NEXT_PUBLIC_BASE_PATH: "/k8s/clusters/c-m-26nk9h9f/api/v1/namespaces/sammwise/services/http:sammwise:80/proxy" + RANCHER_SERVER: "rancher.vzxy.net" # issuer: # issuerEmail: ops@sjultra.com diff --git a/next.config.js b/next.config.js index 43d2d20..a5dfc90 100644 --- a/next.config.js +++ b/next.config.js @@ -1,12 +1,13 @@ module.exports = { - basePath: process.env.NEXT_PUBLIC_BASE_PATH || '', - assetPrefix: process.env.NEXT_PUBLIC_BASE_PATH || '', - hostname: 'rancher.vzxy.net', + basePath: process.env.NEXT_BASE_PATH || '', + assetPrefix: process.env.RANCHER_SERVER + process.env.NEXT_PUBLIC_BASE_PATH || '', + hostname: process.env.RANCHER_SERVER, // images: { // path: process.env.NEXT_PUBLIC_BASE_PATH || '', // }, publicRuntimeConfig: { - webSocketBasePath: process.env.NEXT_PUBLIC_BASE_PATH || '', + hmrEndpoint: 'wss://'+process.env.RANCHER_SERVER+process.env.NEXT_PUBLIC_BASE_PATH, + webSocketBasePath: 'wss://'+process.env.RANCHER_SERVER+process.env.NEXT_PUBLIC_BASE_PATH, } };