From 36cf0bf6e0bb5133146ccd0a6ed842ce59a32d4d Mon Sep 17 00:00:00 2001 From: Gabriel Dantas Date: Wed, 2 Feb 2022 20:43:37 -0300 Subject: [PATCH 1/2] 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 ``` From b72347b090ac12f602f3fd8b4582d6a0a3507786 Mon Sep 17 00:00:00 2001 From: Gabriel Dantas Date: Thu, 3 Feb 2022 10:15:54 -0300 Subject: [PATCH 2/2] lint: docs style Signed-off-by: Gabriel Dantas --- docs/deployment/heroku.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/deployment/heroku.md b/docs/deployment/heroku.md index 0226719a12..1545c34733 100644 --- a/docs/deployment/heroku.md +++ b/docs/deployment/heroku.md @@ -30,24 +30,23 @@ You _might_ also need to set your Heroku app's stack to `container`: $ heroku stack:set container -a ``` -Configuring your app-config.yaml: +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 + 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. +> 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.