@ticketdex/backend
v2.1.43
Published
Ticket DEX backend
Downloads
3
Readme
TicketDEX API package
Infra
The database and SSH-proxy (bastion) server are in private sub-nets while the lambda-api runs in a public subnet.
The database and SSH-proxy can only be accessed via AWS credentials while using aws-server-connect
&& SSM
. See for details
yarn # installs dependencies
sls deploy --stage prod # to deploy to production
sls deploy # to deploy to staging
Remote Migrations
We make use of ssh-tunneling allowing us to access remote DB as if it were local database.
yarn pre-migrate # opens up a ssh-tunnel with the DB at port 5000
DB_PORT=5432 yarn pre-migrate # opens up a ssh-tunnel with the DB at port 5432
To run offline after enabling ssh-tunnel run
serverless offline --stage local
Gotchas
We are not using dotenv-safe because serverless framework ignores uploading .env files