-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dashboard: Refector dashboard to a dashboard framework library. (#1007)
Signed-off-by: Teo Koon Peng <teokoonpeng@gmail.com>
- Loading branch information
Showing
365 changed files
with
1,769 additions
and
9,597 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM ubuntu:24.04 | ||
ARG BRANCH=main | ||
|
||
### Build dashboard | ||
|
||
RUN apt update && apt install -y curl \ | ||
# required for api-server, which is a dev dependency of rmf-dashboard-framework | ||
python3 python3-venv | ||
RUN curl -fsSL https://get.pnpm.io/install.sh | bash - | ||
# shell runs in non-interactive mode, which does not source .bashrc so we need to set the PATH manually | ||
ENV PNPM_HOME /root/.local/share/pnpm | ||
ENV PATH "$PNPM_HOME:$PATH" | ||
# node-canvas does not have prebuilt binaries for latest lts (node 22) | ||
RUN pnpm env use --global 20 | ||
|
||
# fetch sources | ||
RUN mkdir -p /ws \ | ||
&& curl -L https://github.com/open-rmf/rmf-web/archive/$BRANCH.tar.gz -o rmf_web.tar.gz \ | ||
&& tar zxf rmf_web.tar.gz -C /ws --strip-components=1 | ||
|
||
# install deps | ||
RUN cd /ws \ | ||
&& pnpm install --filter rmf-dashboard-framework... | ||
|
||
# replace configs and build | ||
RUN cd /ws/packages/rmf-dashboard-framework \ | ||
&& pnpm build:example examples/demo | ||
|
||
### Set up bare minimum dashboard image | ||
|
||
FROM docker.io/ubuntu:24.04 | ||
COPY --from=0 /ws/packages/rmf-dashboard-framework/examples/demo/dist /opt/dashboard | ||
|
||
RUN apt update && apt install -y curl | ||
|
||
RUN curl -fsSL https://get.pnpm.io/install.sh | bash - | ||
# shell runs in non-interactive mode, which does not source .bashrc so we need to set the PATH manually | ||
ENV PNPM_HOME /root/.local/share/pnpm | ||
ENV PATH "$PNPM_HOME:$PATH" | ||
RUN pnpm env use --global 20 | ||
|
||
RUN pnpm add --global serve | ||
|
||
ENTRYPOINT ["serve", "-sn", "/opt/dashboard"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.