-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
27 lines (23 loc) · 839 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env bash
# tools for building and deploying
go version # > 1.18.2
npm i -g aws-cdk # > 2.28.1 (build d035432)
# This script will deploy the serverless-auth stack to aws.
# setup
# aws configuration for deployment
# export AWS_ACCESS_KEY_ID=
# export AWS_SECRET_ACCESS_KEY=
# export AWS_DEFAULT_REGION=
# stack name
# export SLS_AUTH_APP_NAME=
# supported providers is facebook/google/github/bitbucket/gitlab
# export SLS_AUTH_[provider]_CLIENT_ID=
# export SLS_AUTH_GOOGLE_CLIENT_ID=
# export SLS_AUTH_GOOGLE_CLIENT_SECRET=
# export SLS_AUTH_GOOGLE_CALLBACK=
# export SLS_AUTH_CLIENT_CALLBACK=
# encypetion keys, keep in a safe place.
# export SLS_AUTH_SESSION_SECRET=
# export SLS_AUTH_JWT_SECRET=
# deploy
cd server && go get && export GOOS='linux' && go build -o build/main ./src && cd .. && cd infra && cdk deploy