Heroku Node Deployment

As Associate Product Lead
and Technical Project Leads
you'll be responsible for provisioning Heroku accounts for your students, configuring the applications to use a Postgres
addon, and granting access to the provisioned app to the students who need it (should be WEB students primarily).
Currently only APLs will have full admin access to apps.
There are some settings any team member can perform, eg. Environment Variables
Steps to setting up and provisioning Heroku apps - APLs
If you haven't gotten admin access to Heroku yet please ask your release manager to set that up using your Email
Log into the Heroku console using your email.
You should have received access to the console from your engineering manager.
Click on the
New
button in the top right cornerName the app using our Labs naming convention:
productname-team-api
i.e.ecosoap-a-api

Configuring the PostgresQL
add-on - Release Managers
PostgresQL
add-on - Release ManagersSelect the app and click on
Overview
Select
Configure Add-ons
Search for
Postgres
andHeroku Postgres
should appear in the list of optionsSelect
Heroku Postgres
and select ->Hobby Basic - $9.00
Select
Provision
Adding Members to the provisioned app - Release Managers
Once the app is created click on the app and select the
access
tabClick
Add Member
and add your students and TPL to the app as making sure thatView
,Deploy
,Operate
boxes are all selected. ClickSave Changes
Your students should receive an email granting them access to their console; follow up and make sure they are able to get in
Note: For build-ons, you'll be adding students to an existing Heroku app.
Environment Variables - Any team member with access
From the application tab navigation select
Settings
Select
Reveal Config Vars
**You should already see a
DATABASE_URL
assigned to the postgres add-on youset up**
Add all the proper environment variables
Deployment - APLs
Setup

From the application tab navigation select
Deploy
Select the
GitHub
"Deployment Method"Find the
Connect to GitHub
section and selectBloomTech-Labs
Find your app and select
Connect
Deploy from the
main
branchSelect
Wait for CI to pass before deploy
Enable Automatic Deploys
so that anytime a branch is merged into main

First Deploy
When your repo is ready follow these steps to complete the deploy.
run a manual deploy by hitting the
Deploy Branch
button at the bottom ofthe page
Click
Open app
; you will see the"api":"up"
message if all is well.Using the heroku console run the following commands (Alternatively you
can use the heroku cli app)
bash
then you can run the following commands from the shellnpm run knex migrate:latest
npm run knex seed:run
this is optional if the team wants to start with5 profiles.
Your team is now set up! Now when someone has a PR merged into main
your team's app will update across the world wide web
Next Steps
Checkout how to setup Review Apps to have Heroku automatically deploy your app for each github PR that you create.
Optionally, See the setting up a Custom Domain Guide to make sure that your API doesn't have the ugly herokuapp
in it's URL.
Last updated
Was this helpful?