Heroku

This secton will describe step by step on how to deploy BudgetApp to Heroku.

Prerequisite

Running BudgetApp

Clone BudgetApp

$ heroku login
Enter your Heroku credentials.
Email: adam@example.com
Password (typing will be hidden):
Authentication successful.

Create Heroku App

$ cd ~/
$ git clone https://github.com/paukiatwee/budgetapp.git
$ cd ~/budgetapp
$ heroku apps:create <APP_NAME>

Provision Postgres DB

$ heroku addons:create heroku-postgresql:hobby-dev
$ heroku config -s | grep DATABASE_URL
DATABASE_URL=postgres://user3123:passkja83kd8@ec2-117-21-174-214.compute-1.amazonaws.com:6212/db982398

$ heroku config:set DB_DRIVER=org.postgresql.Driver
$ heroku config:set DB_USERNAME=user3123
$ heroku config:set DB_PASSWORD=passkja83kd8
$ heroku config:set DB_URL=jdbc:postgresql://ec2-117-21-174-214.compute-1.amazonaws.com:6212/db982398
$ heroku config:set DB_DIALECT=io.budgetapp.hibernate.dialect.CustomPostgreSQLDialect

Enabled Postgres DB Backup

$ heroku pg:backups schedule DATABASE_URL --at '00:00 UTC'

Deploy App

$ git push heroku master

Browse to https://<APP_NAME>.herokuapp.com