Skip to content

Commit

Permalink
Fix serverless deployment and run lint
Browse files Browse the repository at this point in the history
  • Loading branch information
aloftus23 committed May 10, 2024
1 parent ca80984 commit ed886c3
Show file tree
Hide file tree
Showing 8 changed files with 7,044 additions and 7,002 deletions.
2 changes: 1 addition & 1 deletion backend/env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dev:
ENDPOINT_TYPE: REGIONAL
VPC_ENDPOINT: dummy
REGION: us-east-1

staging:
REGION: us-east-1
ENDPOINT_TYPE: REGIONAL
Expand Down
14,001 changes: 7,004 additions & 6,997 deletions backend/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
"prettier": "^3.0.0",
"sentencer": "^0.2.1",
"serverless": "^3.30",
"serverless-better-credentials": "^1.2.0",
"serverless-domain-manager": "^7.0",
"serverless-dotenv-plugin": "^6.0.0",
"serverless-plugin-ifelse": "^1.0.7",
"serverless-webpack": "^5.11.0",
"supertest": "^6.3",
"ts-jest": "^27",
Expand Down
6 changes: 5 additions & 1 deletion backend/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ custom:
certificateName: ${file(env.yml):${self:provider.stage}.DOMAIN, ''}
stage: ${self:provider.stage}
createRoute53Record: false
serverlessIfElse:
- If: '"${file(env.yml):${self:provider.stage}.ENDPOINT_TYPE}" == "REGIONAL"'
Exclude:
- provider.vpcEndpointIds

provider:
name: aws
Expand Down Expand Up @@ -164,7 +168,7 @@ functions:


plugins:
- serverless-better-credentials
- serverless-domain-manager
- serverless-webpack
- serverless-dotenv-plugin
- serverless-plugin-ifelse
20 changes: 20 additions & 0 deletions frontend/env.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
---
dev:
FRONTEND_DOMAIN: ''
RESOURCE_POLICY:
- Effect: Allow
Principal: '*'
Action: execute-api:Invoke
Resource: execute-api:/${self:provider.stage}/*/*
ENDPOINT_TYPE: REGIONAL
VPC_ENDPOINT: dummy
REGION: us-east-1

staging:
REGION: us-east-1
Expand Down Expand Up @@ -87,3 +95,15 @@ prod-vpc:
- ${ssm:/crossfeed/prod/SG_ID}
subnetIds:
- ${ssm:/crossfeed/prod/SUBNET_ID}

staging-lz-vpc:
securityGroupIds:
- ${ssm:/crossfeed/staging/SG_ID}
subnetIds:
- ${ssm:/crossfeed/staging/SUBNET_ID}

prod-lz-vpc:
securityGroupIds:
- ${ssm:/crossfeed/prod/SG_ID}
subnetIds:
- ${ssm:/crossfeed/prod/SUBNET_ID}
7 changes: 7 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@
"prettier": "^3.0.3",
"sass": "^1.55.0",
"serverless": "^3.30",
"serverless-better-credentials": "^1.2.0",
"serverless-domain-manager": "^7.0",
"serverless-http": "^3.2.0",
"serverless-plugin-ifelse": "^1.0.7",
"serverless-webpack": "^5.11.0",
"ts-jest": "^29.1.1",
"typescript": "^4.8.4",
Expand Down
6 changes: 5 additions & 1 deletion frontend/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ custom:
certificateName: ${file(env.yml):${self:provider.stage}.DOMAIN, ''}
stage: ${self:provider.stage}
createRoute53Record: false
serverlessIfElse:
- If: '"${file(env.yml):${self:provider.stage}.ENDPOINT_TYPE}" == "REGIONAL"'
Exclude:
- provider.vpcEndpointIds

provider:
name: aws
Expand Down Expand Up @@ -57,5 +61,5 @@ functions:

plugins:
- serverless-domain-manager
- serverless-better-credentials
- serverless-webpack
- serverless-plugin-ifelse

0 comments on commit ed886c3

Please sign in to comment.