A Node.js backend service application.
$ npm install
$ npm run start
$ docker build -t backend-service .
$ docker compose up -d
$ heroku login
$ heroku create <app-name>
# Add Postgres and CloudAMQP add-ons to app
$ heroku addons:create heroku-postgresql:hobby-dev
$ heroku addons:create cloudamqp:lemur
# Set config var to access Postgres without SSL
$ heroku config:set PGSSLMODE=no-verify
# Set config vars that we need for our app
$ heroku config:set JWT_SECRET=some_secret
$ heroku config:set JWT_EXPIRY=900
$ heroku config:set SALT_ROUNDS=10
# Set the stack to container for Docker deployment
$ heroku stack:set container
- Go to your Heroku app dashboard >
Deploy
tab - Under
Deployment method
, selectGitHub
and allow access - Search and connect to your GitHub repository
- Under
Automatic deploys
:- Check
Wait for CI to pass before deploy
- Select
Enable Automatic Deploys
- Check