Skip to content

Commit

Permalink
Merge pull request #67 from scientist-softserv/65-deploy-with-new-url
Browse files Browse the repository at this point in the history
65 deploy with new url
  • Loading branch information
alishaevn authored Apr 18, 2024
2 parents 4c15475 + a6b37a1 commit 8226d4c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env.development.example
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
CLIENT_DOMAIN= # Ref: "Creating The Marketplace App" in the README
CLIENT_ID= # Retrieved from the marketplace application show page under Developer Details
CLIENT_SECRET= # Retrieved from the marketplace application show page under Developer Details
NEXTAUTH_SECRET= # Create this by running `openssl rand -base64 32` in your terminal. (https://next-auth.js.org/configuration/options#nextauth_secret)
NEXTAUTH_URL= # https://next-auth.js.org/configuration/options#nextauth_url
NEXT_PUBLIC_TOKEN= # Ref: "Provider Credentials" in the README
NEXT_PUBLIC_CLIENT_DOMAIN= # Ref: "Creating The Marketplace App" in the README

# uncomment the “SENTRY” prefixed variables below if you are using sentry and need to catch errors in local dev
# SENTRY_AUTH_TOKEN= ref: https://github.com/getsentry/sentry-webpack-plugin#options (authToken)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ _The terms "client" and "provider" are fairly interchangeable in this applicatio

| Name | Required | Location | Description |
| ------------- | ------------- | ------------- | ------------- |
| CLIENT_DOMAIN | No | .env.development | The domain attached to the Client App. Ref: Creating The Marketplace App |
| CLIENT_ID | Yes | .env.development | The identifier of the client's marketplace application |
| CLIENT_SECRET | Yes | .env.development | The secret related to the client's marketplace application |
| 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_DOMAIN | No | .env.development | The domain attached to the Client App. Ref: Creating The Marketplace App |
| 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 All @@ -61,7 +61,7 @@ _The terms "client" and "provider" are fairly interchangeable in this applicatio
| SENTRY_URL | No | .env.development | The base URL of the Sentry instance |

### Creating The Marketplace App
Ensure that a marketplace, e.g. client-name.<NEXT_PUBLIC_CLIENT_DOMAIN>.com, has been created by the Scientist.com Professional Services team. Once that exists, an application needs to be created on that marketplace by a developer with the proper permissions. This is how some of the environment variables are created. You'll know if you have the proper developer permissions if once logged in on the client marketplace, you can hover over your avatar and see "Applications" underneath the "Developer" settings. _If you don't have the permissions, you need to request them, or ask someone with the permissions to complete the steps below._
Ensure that a marketplace, e.g. client-name.<CLIENT_DOMAIN>.com, has been created by the Scientist.com Professional Services team. Once that exists, an application needs to be created on that marketplace by a developer with the proper permissions. This is how some of the environment variables are created. You'll know if you have the proper developer permissions if once logged in on the client marketplace, you can hover over your avatar and see "Applications" underneath the "Developer" settings. _If you don't have the permissions, you need to request them, or ask someone with the permissions to complete the steps below._
- Once you've clicked the "Applications" link mentioned above, press "New Application"
- Only the application name is required for the moment. Name it the same as the provider name.
- Save, and you should be redirected to the "Developer Details" page
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://store.phenovista.com'
clientDomain: 'assayexpress.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'
clientDomain: 'assayexpress.com'
clientId: $CLIENT_ID
clientSecret: $CLIENT_SECRET
googleTagManagerId: ''
Expand Down
2 changes: 1 addition & 1 deletion pages/api/auth/[...nextauth].js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import NextAuth from 'next-auth'
import axios from 'axios'
// TODO(alishaevn): use the api value from https://github.com/assaydepot/rx/issues/21497 in the next phase
import { EXPIRATION_DURATION, getWebhookConfig, createWebhookConfig } from '../../../utils'
const authorizationDomain = process.env.NEXT_PUBLIC_CLIENT_DOMAIN || 'scientist.com'
const authorizationDomain = process.env.CLIENT_DOMAIN || 'scientist.com'

// For more information on each option (and a full list of options) go to: https://next-auth.js.org/configuration/options
const authOptions = {
Expand Down

0 comments on commit 8226d4c

Please sign in to comment.