Merge pull request #18038 from dlaird-ovo/improve-dev-tools-docs

Improve Devtools Docs based on installation in Docker
This commit is contained in:
Ben Lambert
2023-06-13 10:28:44 +02:00
committed by GitHub
2 changed files with 31 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-devtools': patch
---
Updated DevTools documentation for Docker users
+26
View File
@@ -12,6 +12,20 @@ Lists helpful information about your current running Backstage instance such as:
![Example of Info tab](./docs/devtools-info-tab.png)
#### Backstage Version Reporting
The Backstage Version that is reported requires `backstage.json` to be present at the root of the running backstage instance.
You may need to modify your Dockerfile to ensure `backstage.json` is copied into the `WORKDIR` of your image.
```sh
WORKDIR /app
# This switches many Node.js dependencies to production mode.
ENV NODE_ENV production
# Then copy the rest of the backend bundle, along with any other files we might want (including backstage.json).
COPY --chown=node:node ... backstage.json ./
```
### Config
Lists the configuration being used by your current running Backstage instance.
@@ -375,3 +389,15 @@ Configuration details:
- `name` is the friendly name for your endpoint
- `type` can be either `ping` or `fetch` and will perform the respective action on the `target`
- `target` is either a URL or server that you want to trigger a `type` action on
### External Dependencies Requirements
If you are using the `ping` type you must ensure that `ping` is available in the Host OS that is running Backstage.
For example you may need to add `ping` into the Dockerfile that builds your Backstage image:
```sh
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && \
apt-get install -y ... iputils-ping
```