Skip to content

Commit

Permalink
Merge branch 'master' into new-search-graphic
Browse files Browse the repository at this point in the history
  • Loading branch information
js0mmer authored Nov 4, 2023
2 parents 8bbaf4a + 98a3103 commit bd4ea2a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
PRODUCTION_DOMAIN: ${{secrets.PRODUCTION_DOMAIN}}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
NODE_ENV: ${{ github.event_name == 'pull_request' && 'staging' || 'production' }}

- name: Comment staging URL
uses: marocchino/sticky-pull-request-comment@v2
Expand Down
2 changes: 1 addition & 1 deletion api/src/helpers/mongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const client = new MongoClient(process.env.MONGO_URL, { useNewUrlParser: true, u
/**
* Database name to use in mongo
*/
const DB_NAME = 'peterPortalDB';
const DB_NAME = process.env.NODE_ENV == 'production' ? 'peterPortalDB' : 'peterPortalDevDB';
/**
* Collection names that we are using
*/
Expand Down
2 changes: 1 addition & 1 deletion api/src/types/environment.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ declare global {
*/
interface ProcessEnv {
MONGO_URL: string;
NODE_ENV: 'development' | 'production';
NODE_ENV: 'development' | 'production' | 'staging';
PORT?: string;
PUBLIC_API_URL: string;
PUBLIC_API_GRAPHQL_URL: string;
Expand Down
3 changes: 2 additions & 1 deletion stacks/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export function BackendStack({app, stack}: StackContext) {
GOOGLE_CLIENT: process.env.GOOGLE_CLIENT,
GOOGLE_SECRET: process.env.GOOGLE_SECRET,
PRODUCTION_DOMAIN: process.env.PRODUCTION_DOMAIN,
ADMIN_EMAILS: process.env.ADMIN_EMAILS
ADMIN_EMAILS: process.env.ADMIN_EMAILS,
NODE_ENV: process.env.NODE_ENV
}
}
},
Expand Down

0 comments on commit bd4ea2a

Please sign in to comment.