-
Install Heroku CLI (https://devcenter.heroku.com/articles/heroku-cli)
-
Login to Heroku CLI
-
Login to Heroku's container registry:
heroku container:login
- If you face issues, try
docker login --username=_ --password=$(heroku auth:token) registry.heroku.com
-
Create a new Heroku app and add Postgres DB add-on
-
Define your desired Prisma image
VERSION
and set theHEROKU_APP
varirables in a local.env
-
Insert the ENV variables required in
prerun_hook.sh
in the config for your Heroku app. Define the following:PRISMA_MANAGEMENT_API_SECRET
DB_HOST
DB_NAME
DB_USER
DB_PASSWORD
PRISMA_CONFIG_PATH
(set this to/app/config.yml
)JAVA_OPTS
(set this to-Xmx358m
)
NOTE: The
DB_*
fields can be derived from theDATABASE_URL
ENV var set in Heroku when you add the Postgres DB. ie,postgres://<DB_USER>:<DB_PASSWORD>@<DB_HOST>:5432/<DB_NAME>
Also, no need to set the
PORT
, as it is dynamically defined by Heroku during deployment -
Run
yarn deploy
- Have the Heroku CLI installed
- Be logged in to an account that has access to the projects
- Run
yarn deploy
- Profit
Change the version VERSION
ENV var in .env
and run yarn deploy
again