Skip to content

Commit

Permalink
create the NEXT_PUBLIC_CLIENT_BASE_URL env variable
Browse files Browse the repository at this point in the history
this new variable will be necessary so that redirects happen properly
when the client is using their own domain, but pointing it to the
softserv.cloud instance.

- ref: #46
  • Loading branch information
alishaevn committed Feb 1, 2024
1 parent 8303979 commit 88d77c7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ NEXT_PUBLIC_PROVIDER_NAME=phenovista
NEXT_PUBLIC_PROVIDER_ID=12527
NEXT_PUBLIC_SCIENTIST_API_VERSION=v2
NEXT_PUBLIC_WEBHOOK_URL=http://ss-mailer/webstore
NEXT_PUBLIC_APP_BASE_URL=https://www.phenovista.vercel.app
NEXT_PUBLIC_APP_BASE_URL=https://phenovista.softserv.cloud/
NEXT_PUBLIC_CLIENT_BASE_URL=https://store.phenovista.cloud/
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# reference https://nextjs.org/docs/basic-features/environment-variables#exposing-environment-variables-to-the-browser
# to learn about the NEXT_PUBLIC prefix

NEXT_PUBLIC_APP_BASE_URL=https://store.webstore.com
NEXT_PUBLIC_APP_BASE_URL=https://webstore.softserv.com
NEXT_PUBLIC_PROVIDER_ID=0001
NEXT_PUBLIC_PROVIDER_NAME=webstore
NEXT_PUBLIC_SCIENTIST_API_VERSION=v2
NEXT_PUBLIC_WEBHOOK_URL=http://ss-mailer/webstore
NEXT_PUBLIC_CLIENT_BASE_URL=https://store.webstore.com
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ _The terms "client" and "provider" are fairly interchangeable in this applicatio
| NEXTAUTH_SECRET | Yes | .env.development | Used to encrypt the NextAuth.js JWT |
| NEXTAUTH_URL | Yes | .env.development | The authentication route used for NextAuth.js |
| NEXT_PUBLIC_APP_BASE_URL | Yes | .env | The URL to the deployed webstore instance |
| NEXT_PUBLIC_CLIENT_BASE_URL | No | .env | The URL to the Client CNAME that points at NEXT_PUBLIC_APP_BASE_URL |
| NEXT_PUBLIC_PROVIDER_ID | Yes | .env | The identifier of the client's marketplace in the database |
| NEXT_PUBLIC_PROVIDER_NAME | Yes | .env | The subdomain of the client's marketplace |
| NEXT_PUBLIC_SCIENTIST_API_VERSION | Yes | .env | The version of the API we should be talking to |
Expand Down
2 changes: 2 additions & 0 deletions charts/webstore/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ spec:
value: "{{ .Values.nextAuthUrl }}"
- name: NEXT_PUBLIC_APP_BASE_URL
value: "{{ .Values.appBaseUrl }}"
- name: NEXT_PUBLIC_CLIENT_BASE_URL
value: "{{ .Values.clientBaseUrl }}"
- name: NEXT_PUBLIC_GOOGLE_TAG_MANAGER_ID
value: "{{ .Values.googleTagManagerId }}"
- name: NEXT_PUBLIC_PROVIDER_ID
Expand Down
1 change: 1 addition & 0 deletions ops/production-deploy.tmpl.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
appBaseUrl: 'https://phenovista.softserv.cloud'
clientBaseUrl: 'https://store.phenovista.com'
clientId: $CLIENT_ID
clientSecret: $CLIENT_SECRET
googleTagManagerId: 'GTM-PQGCP24G'
Expand Down
1 change: 1 addition & 0 deletions ops/staging-deploy.tmpl.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
appBaseUrl: 'https://phenovista-staging.softserv.cloud'
clientBaseUrl: ''
clientId: $CLIENT_ID
clientSecret: $CLIENT_SECRET
googleTagManagerId: ''
Expand Down

0 comments on commit 88d77c7

Please sign in to comment.