From 9560a1a4ab42a329124bf3daccf43e4e431dd5a0 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Wed, 13 Jan 2021 15:24:22 +0100 Subject: [PATCH 1/3] chore: Move Dockerfile at root to contrib/ In deployment docs https://backstage.io/docs/getting-started/deployment-other, we suggest doing a `yarn docker-build` and I thought the root Dockerfile was being used to build the image. Hence I modified it for some needs, but no changes were reflected. Later I found that `yarn docker-build` uses the `Dockerfile` present inside `packages/backend` https://github.com/backstage/backstage/blob/master/packages/backend/Dockerfile. So, I think the Dockerfile at the root is a bit misleading, and should be moved to contrib. Signed-off-by: Himanshu Mishra --- Dockerfile => contrib/docker/frontend-with-nginx/Dockerfile | 0 .../docker/frontend-with-nginx/docker}/default.conf.template | 0 {docker => contrib/docker/frontend-with-nginx/docker}/run.sh | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename Dockerfile => contrib/docker/frontend-with-nginx/Dockerfile (100%) rename {docker => contrib/docker/frontend-with-nginx/docker}/default.conf.template (100%) rename {docker => contrib/docker/frontend-with-nginx/docker}/run.sh (100%) diff --git a/Dockerfile b/contrib/docker/frontend-with-nginx/Dockerfile similarity index 100% rename from Dockerfile rename to contrib/docker/frontend-with-nginx/Dockerfile diff --git a/docker/default.conf.template b/contrib/docker/frontend-with-nginx/docker/default.conf.template similarity index 100% rename from docker/default.conf.template rename to contrib/docker/frontend-with-nginx/docker/default.conf.template diff --git a/docker/run.sh b/contrib/docker/frontend-with-nginx/docker/run.sh similarity index 100% rename from docker/run.sh rename to contrib/docker/frontend-with-nginx/docker/run.sh From 77c8a9af2106396f1538379142a2d7dbe44c8bb6 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Wed, 13 Jan 2021 23:16:19 +0100 Subject: [PATCH 2/3] docs: Update project structure page to remove docker/ --- docs/support/project-structure.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/support/project-structure.md b/docs/support/project-structure.md index bb2c02ec76..5c8a8cd3bb 100644 --- a/docs/support/project-structure.md +++ b/docs/support/project-structure.md @@ -32,10 +32,6 @@ the code. better control over our `yarn.lock` file and hopefully avoid problems due to yarn versioning differences. -- [`docker/`](https://github.com/backstage/backstage/tree/master/docker) - Files - related to our root Dockerfile. We are planning to refactor this, so expect - this folder to be moved in the future. - - [`contrib/`](https://github.com/backstage/backstage/tree/master/contrib) - Collection of examples or resources provided by the community. We really appreciate contributions in here and encourage them being kept up to date. From cca03162bcc9a54b01a891e8256101b9e5a16a45 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Sun, 17 Jan 2021 21:53:37 +0100 Subject: [PATCH 3/3] chore: Remove yarn docker-build:app command and related docs --- contrib/docker/frontend-with-nginx/Dockerfile | 2 -- docs/overview/architecture-overview.md | 11 ----------- package.json | 1 - 3 files changed, 14 deletions(-) diff --git a/contrib/docker/frontend-with-nginx/Dockerfile b/contrib/docker/frontend-with-nginx/Dockerfile index 174548a90c..a444c9de83 100644 --- a/contrib/docker/frontend-with-nginx/Dockerfile +++ b/contrib/docker/frontend-with-nginx/Dockerfile @@ -8,8 +8,6 @@ FROM nginx:mainline # This dockerfile requires the app to be built on the host first, as it # simply copies in the build output into the image. -# The safest way to build this image is to use `yarn docker-build:app` - RUN apt-get update && apt-get -y install jq && rm -rf /var/lib/apt/lists/* COPY packages/app/dist /usr/share/nginx/html diff --git a/docs/overview/architecture-overview.md b/docs/overview/architecture-overview.md index d8069c8665..f2f2bc72c8 100644 --- a/docs/overview/architecture-overview.md +++ b/docs/overview/architecture-overview.md @@ -185,17 +185,6 @@ separate Docker images. ![Boxes around the architecture to indicate how it is containerised](../assets/architecture-overview/containerised.png) -The frontend container can be built with a provided command. - -```bash -yarn install -yarn tsc -yarn run docker-build:app -``` - -Running this will simply generate a Docker container containing the contents of -the UIs `dist` directory. - The backend container can be built by running the following command: ```bash diff --git a/package.json b/package.json index 8376915729..71a54ceee5 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,6 @@ "lint:all": "lerna run lint --", "lint:type-deps": "node scripts/check-type-dependencies.js", "docgen": "lerna run docgen", - "docker-build:app": "yarn workspace example-app build && docker build . -t spotify/backstage", "docker-build": "yarn tsc && yarn workspace example-backend build-image", "create-plugin": "backstage-cli create-plugin --scope backstage --no-private", "remove-plugin": "backstage-cli remove-plugin",