Skip to content

Commit

Permalink
Fix/convict fixes (#660)
Browse files Browse the repository at this point in the history
* fix: make site launch vars optional, remove redundant ones

* fix: remove duplicate express-session in package json
  • Loading branch information
harishv7 authored and alexanderleegs committed Mar 30, 2023
1 parent cf8a395 commit 50ae7dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
"debug": "~2.6.9",
"exponential-backoff": "^3.1.0",
"express": "~4.17.3",
"express-session": "^1.17.3",
"express-rate-limit": "^6.7.0",
"express-session": "^1.17.3",
"file-type": "^16.5.4",
Expand Down
31 changes: 9 additions & 22 deletions src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const config = convict({
env: {
doc: "The application environment.",
env: "NODE_ENV",
format: ["LOCAL_DEV", "DEV", "test", "prod", "staging"],
default: "LOCAL_DEV",
format: ["dev", "test", "prod", "staging"],
default: "dev",
},
port: {
doc: "The port to bind.",
Expand Down Expand Up @@ -82,13 +82,6 @@ const config = convict({
format: "required-positive-number",
default: 10,
},
localSiteAccessToken: {
doc: "Access token for local site",
env: "LOCAL_SITE_ACCESS_TOKEN",
sensitive: true,
format: "required-string",
default: "",
},
},
auth: {
cookieDomain: {
Expand Down Expand Up @@ -153,24 +146,24 @@ const config = convict({
default: "ap-southeast-1",
},
accountNumber: {
doc: "AWS account number",
doc: "AWS account number (microservices)",
env: "AWS_ACCOUNT_NUMBER",
sensitive: true,
format: "required-string",
format: String,
default: "",
},
accessKeyId: {
doc: "AWS access key ID",
doc: "AWS access key ID (microservices)",
env: "AWS_ACCESS_KEY_ID",
sensitive: true,
format: "required-string",
format: String,
default: "",
},
secretAccessKey: {
doc: "AWS secret access key",
doc: "AWS secret access key (microservices)",
env: "AWS_SECRET_ACCESS_KEY",
sensitive: true,
format: "required-string",
format: String,
default: "",
},
},
Expand All @@ -187,12 +180,6 @@ const config = convict({
format: "required-string",
default: "",
},
siteLaunchQueueUrl: {
doc: "URL of the site launch SQS queue",
env: "SITE_LAUNCH_QUEUE_URL",
format: "required-string",
default: "",
},
},
},
github: {
Expand Down Expand Up @@ -250,7 +237,7 @@ const config = convict({
dataDog: {
env: {
doc: "The DataDog environment",
format: ["production", "development", "local"],
format: ["development", "local", "staging", "production"],
env: "DD_ENV",
default: "local",
},
Expand Down

0 comments on commit 50ae7dd

Please sign in to comment.