Skip to content

Commit

Permalink
Add config
Browse files Browse the repository at this point in the history
  • Loading branch information
TaEduard committed Nov 6, 2023
1 parent b598f64 commit aabfe1c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
3 changes: 3 additions & 0 deletions helm/service/templates/sammwise.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions helm/service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]
Expand Down
9 changes: 5 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -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,
}
};

0 comments on commit aabfe1c

Please sign in to comment.