Skip to content

Commit

Permalink
Tidy up docs related to build
Browse files Browse the repository at this point in the history
- remove reference to Dockerfile.dev
- move unsupported build steps from public docs to repo docs
- add unsupported info to other files in repo docs
  • Loading branch information
richard-cox committed Feb 6, 2024
1 parent b08e928 commit c510161
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Building an Image for Container Registries

> ⚠️ Documentation in this directory is intended for internal use only. Any information contained here is unsupported.
Sometimes you may need to have a custom version of the dashboard that is packaged alongside Rancher to be hosted within Github's [container registry](https://docs.github.com/en/packages). There are a few use cases for this, for instance when developing a package/product for Rancher that doesn't need to be standalone or when it isn't necessary for the package to exist in the Dashboard by default.

---
Expand Down Expand Up @@ -46,8 +48,8 @@ WORKDIR /src
COPY . .
RUN yarn --pure-lockfile install

ENV ROUTER_BASE="/dashboard" \
RESOURCE_BASE="/dashboard"
ENV ROUTER_BASE="/dashboard/" \
RESOURCE_BASE="/dashboard/"
RUN yarn run build

FROM rancher/rancher:v2.8-head
Expand Down
13 changes: 13 additions & 0 deletions docs/developer/build-methods/other-build-methods.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Other Building Modes

> ⚠️ Documentation in this directory is intended for internal use only. Any information contained here is unsupported.

```bash
# Build for standalone use within Rancher
# (These are done on commit/tag via Drone)
./scripts/build-embedded # for embedding into rancher builds
./scripts/build-hosted # for hosting on a static file webserver and pointing Rancher's ui-dashboard-index at it
# Output in dist/

```
2 changes: 2 additions & 0 deletions docs/developer/har-files.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Using HAR Files

> ⚠️ Documentation in this directory is intended for internal use only. Any information contained here is unsupported.
A HAR file can be created from a web browser (such as Chrome) and can contain performance data but also the network requests captured over a period of time.

A HAR file can therefore be a useful tool for debugging and analyzing a UI problem.
Expand Down
41 changes: 0 additions & 41 deletions docusaurus/docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,44 +26,3 @@ API=https://your-rancher yarn dev

> Note: `API` is the URL of a deployed Rancher environment (backend API)
## Other Building Modes

> This documentation is out of date
```bash
# Build for standalone use within Rancher
# (These are done on commit/tag via Drone)
./scripts/build-embedded # for embedding into rancher builds
./scripts/build-hosted # for hosting on a static file webserver and pointing Rancher's ui-dashboard-index at it
# Output in dist/

# Build and run with server-side-rendering
# (This method and SSR are not currently used, but should be maintained for future)
yarn build
yarn start

# Develop via Docker instead of a local nodejs
docker build -f Dockerfile.dev -t dashboard:dev .
docker run -v $(pwd):/src \
-v dashboard_node:/src/node_modules \
-p 8005:8005 \
-e API=https://your-rancher \
dashboard:dev
# The first time will take *forever* installing node_modules into the volume; it will be faster next time.
# Goto https://localhost:8005

# Developing against a standalone "Steve" API on a Mac
git clone https://github.com/rancher/steve.git
cd steve
make run-host

cd dashboard
docker build -f Dockerfile.dev -t rancher/dashboard:dev .
docker run -v $(pwd):/src \
-v dashboard_node:/src/node_modules \
-p 8005:8005 \
-e API=http://172.17.0.1:8989 \
rancher/dashboard:dev
# The first time will take *forever* installing node_modules into the volume; it will be faster next time.
# Goto https://localhost:8005
```

0 comments on commit c510161

Please sign in to comment.