Skip to content

Commit

Permalink
Some env var defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinGuzman committed Sep 9, 2024
1 parent 87d4d1d commit 59d8889
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ FROM node:20-alpine as production

WORKDIR /app

ARG HOLD_REQUEST_NOTIFICATION
ARG SEARCH_RESULTS_NOTIFICATION

ENV NODE_ENV=production
ENV TZ=America/New_York

ENV HOLD_REQUEST_NOTIFICATION=${HOLD_REQUEST_NOTIFICATION}
ENV SEARCH_RESULTS_NOTIFICATION=${SEARCH_RESULTS_NOTIFICATION}

# Install dependencies.
COPY package.json ./
COPY package-lock.json ./
Expand Down
8 changes: 4 additions & 4 deletions src/app/data/appConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import mapLocations from '../utils/mapLocations';
const appConfig = {
appTitle: 'NYPL | Discovery',
appName: 'discovery',
displayTitle: process.env.DISPLAY_TITLE || 'Shared Collection Catalog',
displayTitle: process.env.DISPLAY_TITLE || 'Research Catalog',
baseUrl:
process.env.BASE_URL || '/research/research-catalog',
redirectFromBaseUrl: process.env.REDIRECT_FROM_BASE_URL,
legacyBaseUrl: process.env.LEGACY_BASE_URL,
redirectFromBaseUrl: process.env.REDIRECT_FROM_BASE_URL || '/research/collections/shared-collection-catalog',
legacyBaseUrl: process.env.LEGACY_BASE_URL || 'https://legacycatalog.nypl.org',
favIconPath: 'https://ux-static.nypl.org/images/favicon.ico',
port: 3001,
environment: process.env.APP_ENV || 'production',
Expand Down Expand Up @@ -42,7 +42,7 @@ const appConfig = {
'https://digital-research-books-api.nypl.org/v3/sfr/search',
},
},
circulatingCatalog: process.env.CIRCULATING_CATALOG,
circulatingCatalog: process.env.CIRCULATING_CATALOG || 'https://borrow.nypl.org',
shepApi: process.env.SHEP_API,
loginUrl: process.env.LOGIN_URL || 'https://login.nypl.org/auth/login',
logoutUrl: process.env.LOGIN_BASE_URL ? process.env.LOGIN_BASE_URL + '/logout' : 'https://login.nypl.org/auth/logout',
Expand Down

0 comments on commit 59d8889

Please sign in to comment.