> heroku create -s container go-graphql-boilerplate
> heroku addons:create heroku-postgresql:hobby-dev
> heroku config:set ENVIRONMENT="production"
> heroku config:set IS_HEROKU=true
> heroku config:set GO_SERVES_STATIC=true
> heroku config:set JWT_SECRET="your-jwt-secret"
Even though the above database provisioning command added the DATABASE_URL environment variable for us, the container startup process requies the host of the DB as another environment variable to verify that it is up. To get your DATABASE_URL to figure out the DB host execute:
> heroku config:get DATABASE_URL
This will give you a connection string similar to:
> postgres://username:password@host:5432/dbname
We will extract the host:5432
portion directly after the @
and set it as our POSTGRESS_ADDRESS
environment variable:
> heroku config:set POSTGRESS_ADDRESS="host:5432"
> git push heroku master