-
Notifications
You must be signed in to change notification settings - Fork 1
Deploy to Heroku
Nicholas Perry edited this page Aug 31, 2022
·
4 revisions
First we download/install all the packages:
npm install
Once the packages are available, we can run the NPM build commands.
This will set up a docker container for deploying to Heroku.
npm run build:all:prod
npm run postinstall
Now with the docker container ready to deploy, we can push it to Heroku.
Note: Replace "[my-app]" with the name of your Heroku app name. (This is configured as part of creating a dyno to host a docker image on Heroku)
cd app-server
heroku container:push web --app [my-app]
heroku container:release web --app [my-app]
If you get Error: docker push exited with Error: 1
when running the Heroku push or release commands...
You also have to tell Heroku to login as well using this command:
heroku container:login
Your barring any errors, your Heroku instance should be properly updated!
The old way (ignore this)
ng build log --configuration production
ng build demo --configuration production
docker-compose build
heroku container:push web --app [my-app]
heroku container:release web --app [my-app]