mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
deploying api with api domain
This commit is contained in:
parent
c7a765c193
commit
043d390977
2 changed files with 9 additions and 0 deletions
2
.github/workflows/deploy_fastapi_backend.yml
vendored
2
.github/workflows/deploy_fastapi_backend.yml
vendored
|
|
@ -21,6 +21,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
npm install -g serverless
|
npm install -g serverless
|
||||||
npm install -g serverless-python-requirements
|
npm install -g serverless-python-requirements
|
||||||
|
npm install -g serverless-domain-manager
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -50,4 +51,5 @@ jobs:
|
||||||
SECRET_KEY: ${{ secrets.NEXTAUTH_SECRET }}
|
SECRET_KEY: ${{ secrets.NEXTAUTH_SECRET }}
|
||||||
ALGORITHM: 'HS256'
|
ALGORITHM: 'HS256'
|
||||||
PLAN_TRIGGER_BUCKET: 'retrofit-plan-inputs-${{ github.ref_name }}'
|
PLAN_TRIGGER_BUCKET: 'retrofit-plan-inputs-${{ github.ref_name }}'
|
||||||
|
DOMAIN_NAME: ${{ secrets.DOMAIN_NAME }}
|
||||||
run: cd backend && sls deploy --stage ${{ github.ref_name }} --verbose
|
run: cd backend && sls deploy --stage ${{ github.ref_name }} --verbose
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ provider:
|
||||||
SECRET_KEY: ${env:SECRET_KEY}
|
SECRET_KEY: ${env:SECRET_KEY}
|
||||||
ALGORITHM: ${env:ALGORITHM}
|
ALGORITHM: ${env:ALGORITHM}
|
||||||
PLAN_TRIGGER_BUCKET: ${env:PLAN_TRIGGER_BUCKET}
|
PLAN_TRIGGER_BUCKET: ${env:PLAN_TRIGGER_BUCKET}
|
||||||
|
DOMAIN_NAME: ${env:DOMAIN_NAME}
|
||||||
|
|
||||||
package:
|
package:
|
||||||
individually: true
|
individually: true
|
||||||
|
|
@ -18,6 +19,7 @@ package:
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
- serverless-python-requirements
|
- serverless-python-requirements
|
||||||
|
- serverless-domain-manager
|
||||||
|
|
||||||
custom:
|
custom:
|
||||||
pythonRequirements:
|
pythonRequirements:
|
||||||
|
|
@ -26,6 +28,11 @@ custom:
|
||||||
useDocker: true
|
useDocker: true
|
||||||
dockerSsh: true
|
dockerSsh: true
|
||||||
fileName: requirements/base.txt
|
fileName: requirements/base.txt
|
||||||
|
customDomain:
|
||||||
|
domainName: api-${self:provider.stage}.${self:provider.environment.DOMAIN_NAME}
|
||||||
|
stage: ${self:provider.stage}
|
||||||
|
createRoute53Record: true
|
||||||
|
certificateArn: ${ssm:/ssl_certificate_arn~true}
|
||||||
|
|
||||||
functions:
|
functions:
|
||||||
app:
|
app:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue