Skip to content

Commit

Permalink
chore: try out docker env variable addition
Browse files Browse the repository at this point in the history
  • Loading branch information
gweiying committed Mar 14, 2023
1 parent 79d3b8c commit 27866ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
${{ runner.OS }}-node-
${{ runner.OS }}-
- run: npm ci --legacy-peer-deps
- run: echo CLOUDMERSIVE_KEY_CI=${{secrets.CLOUDMERSIVE_KEY}} >> .env
- run: echo CLOUDMERSIVE_KEY=${{secrets.CLOUDMERSIVE_KEY}} >> .env
- run: npm run test:e2e-headless
gatekeep:
name: Determine if Build & Deploy is needed
Expand Down
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ services:
- '3000:3000' # Webpack dev server
- '8080:8080' # Express
- '9229:9229' # Debugging for Node.js
env_file:
- .env
environment:
- NODE_ENV=development
- PORT=8080
Expand Down Expand Up @@ -46,7 +44,8 @@ services:
- AWS_SECRET_ACCESS_KEY=foobar
- CSP_ONLY_REPORT_VIOLATIONS=true
- SAFE_BROWSING_KEY=
- CLOUDMERSIVE_KEY=
# https://stackoverflow.com/a/74069689 Removed the assignment operator so that .env file variables are used
- CLOUDMERSIVE_KEY
- ASSET_VARIANT=gov
- SES_HOST=maildev
- SES_PORT=25
Expand Down
5 changes: 1 addition & 4 deletions src/server/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,7 @@ export const cspReportUri = process.env.CSP_REPORT_URI

export const safeBrowsingLogOnly = process.env.SAFE_BROWSING_LOG_ONLY === 'true'

export const cloudmersiveKey: string | undefined = process.env
.CLOUDMERSIVE_KEY_CI
? process.env.CLOUDMERSIVE_KEY_CI
: process.env.CLOUDMERSIVE_KEY
export const cloudmersiveKey: string | undefined = process.env.CLOUDMERSIVE_KEY
export const safeBrowsingKey: string | undefined = process.env.SAFE_BROWSING_KEY

// LocalStack variables.
Expand Down

0 comments on commit 27866ec

Please sign in to comment.