File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,14 @@ To build the app for production:
3333- execute ` npm run build ` . This will create a ` build ` folder in your project directory.
3434- deploy the contents of the build folder to a web server. You should then be able to run the web app.
3535
36+ ### Build and run Docker image
37+ Make sure you have a recent version of ` docker ` installed.
38+ Use the script under ` ./tools/neodash-build-run.bash ` to build the multi-stage NeoDash image & access it with nginx:
39+ ```
40+ $ cd tools/
41+ $ ./neodash-build-run.bash
42+ ```
43+ Then go to http://localhost:8080/ in your browser.
3644
3745 ## Extending NeoDash
3846 As of v2.0, NeoDash is easy to extend with your own visualizations. There are two steps to take to plug in your own charts:
Original file line number Diff line number Diff line change 1+ FROM centos:centos8.3.2011 AS builder
2+
3+ RUN yum install -y epel-release; yum check-update; pwd
4+ RUN yum install -y rsync git
5+
6+ RUN dnf module list nodejs && dnf module enable -y nodejs:12
7+ RUN dnf install -y nodejs
8+
9+ RUN git clone -b 2.0.5 https://github.com/nielsdejong/neodash.git /usr/local/src/neodash
10+ RUN npm install -g typescript
11+ RUN npm install -g jest
12+
13+ RUN git clone https://github.com/nielsdejong/charts.git /usr/local/src/charts && cd /usr/local/src/charts && git checkout cd8bf3707d48f2c34ec6a1ad126cfd28b5ac3065
14+ RUN cd /usr/local/src/charts; npm install; npm run build
15+ WORKDIR /usr/local/src/neodash
16+ RUN rm -rf node_modules/ && npm install
17+ RUN cd /usr/local/src/neodash/node_modules/@graphapps/charts; rsync -avP /usr/local/src/charts/* .
18+ RUN npm run build
19+
20+
21+ FROM nginx:mainline AS neodash
22+ LABEL org.opencontainers.image.authors=
"[email protected] " 23+ WORKDIR /usr/share/nginx/html
24+ COPY --from=builder /usr/local/src/neodash/build /usr/share/nginx/html
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ docker build . -t neodash
3+ docker run -it --rm -p 8080:80 neodash
You can’t perform that action at this time.
0 commit comments