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
Newbutton in the top right cornerName the app using our Labs naming convention:
productname-team-apii.e.ecosoap-a-api

Configuring the PostgresQL add-on - Release Managers
PostgresQL add-on - Release ManagersSelect the app and click on
OverviewSelect
Configure Add-onsSearch for
PostgresandHeroku Postgresshould appear in the list of optionsSelect
Heroku Postgresand select ->Hobby Basic - $9.00Select
Provision
Adding Members to the provisioned app - Release Managers
Once the app is created click on the app and select the
accesstabClick
Add Memberand add your students and TPL to the app as making sure thatView,Deploy,Operateboxes are all selected. ClickSave ChangesYour 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
SettingsSelect
Reveal Config Vars**You should already see a
DATABASE_URLassigned to the postgres add-on youset up**
Add all the proper environment variables
Deployment - APLs
Setup

From the application tab navigation select
DeploySelect the
GitHub"Deployment Method"Find the
Connect to GitHubsection and selectBloomTech-LabsFind your app and select
ConnectDeploy from the
mainbranchSelect
Wait for CI to pass before deployEnable Automatic Deploysso 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 Branchbutton 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)
bashthen you can run the following commands from the shellnpm run knex migrate:latestnpm run knex seed:runthis 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?