From 36cf0bf6e0bb5133146ccd0a6ed842ce59a32d4d Mon Sep 17 00:00:00 2001 From: Gabriel Dantas Date: Wed, 2 Feb 2022 20:43:37 -0300 Subject: [PATCH] update document Signed-off-by: Gabriel Dantas --- docs/deployment/heroku.md | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/docs/deployment/heroku.md b/docs/deployment/heroku.md index 42ab817b30..0226719a12 100644 --- a/docs/deployment/heroku.md +++ b/docs/deployment/heroku.md @@ -18,11 +18,10 @@ First, install the $ heroku login ``` -Heroku runs a container registry on `registry.heroku.com`. To push Backstage -Docker images, log in to the container registry also: +If you have not yet created a project through the Heroku interface, you can create it through the CLI. ```shell -$ heroku container:login +$ heroku create ``` You _might_ also need to set your Heroku app's stack to `container`: @@ -31,13 +30,44 @@ You _might_ also need to set your Heroku app's stack to `container`: $ heroku stack:set container -a ``` +Configuring your app-config.yaml: + +```yaml +app: + # Should be the same as backend.baseUrl when using the `app-backend` plugin + baseUrl: https://.herokuapp.com + + +backend: + baseUrl: https://.herokuapp.com + listen: + port: + $env: PORT + # The $PORT environment variable is a feature of Heroku + # https://devcenter.heroku.com/articles/dynos#web-dynos +``` + +> Make sure your file is being copied into your container in the Dockerfile. + +Before building the Docker image, run the [backstage host build commands](https://backstage.io/docs/deployment/docker#host-build). They must be run whenever you are going to publish a new image. + +Heroku runs a container registry on `registry.heroku.com`. To push Backstage +Docker images, log in to the container registry also: + +```shell +$ heroku container:login +``` + ## Push and deploy a Docker image Now we can push a Backstage [Docker image](docker.md) to Heroku's container registry and release it to the `web` worker: ```bash -$ heroku container:push web -a +$ docker image build . -f packages/backend/Dockerfile --tag registry.heroku.com//web + +$ docker push registry.heroku.com//web + $ heroku container:release web -a ```