File tree Expand file tree Collapse file tree 4 files changed +34
-6
lines changed Expand file tree Collapse file tree 4 files changed +34
-6
lines changed Original file line number Diff line number Diff line change 1
- FROM node:10
1
+ FROM skydive/skydive
2
+
2
3
WORKDIR /usr/src/skydive-ui
4
+
5
+ RUN apt-get -y update \
6
+ && apt-get -y install nodejs npm
7
+
3
8
COPY package.json /usr/src/skydive-ui
9
+ COPY package-lock.json /usr/src/skydive-ui
10
+ COPY tsconfig.json /usr/src/skydive-ui
11
+ COPY webpack.config.js /usr/src/skydive-ui
12
+ COPY assets /usr/src/skydive-ui/assets
13
+ COPY src /usr/src/skydive-ui/src
14
+ COPY entry.sh /usr/src/skydive-ui
15
+
4
16
RUN npm install
5
- COPY . .
6
- CMD [ "/usr/src/skydive-ui/node_modules/webpack-dev-server/bin/webpack-dev-server.js" , "--host" , "0.0.0.0" ]
17
+ RUN npm run build
18
+
19
+ ENTRYPOINT /usr/src/skydive-ui/entry.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [ -f /dump.json ]; then
4
+ /usr/bin/skydive --conf /etc/skydive.yml analyzer &
5
+ sleep 15
6
+
7
+ /usr/bin/skydive client topology import --file /dump.json
8
+ fi
9
+
10
+ python3 -m http.server 8080 --directory dist/
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " topsky " ,
2
+ "name" : " skydive-ui " ,
3
3
"version" : " 0.1.0" ,
4
4
"private" : true ,
5
5
"dependencies" : {
69
69
"webpack-dev-server" : " ^3.11.0"
70
70
},
71
71
"scripts" : {
72
- "start" : " webpack serve --mode development --disable-host-check --host 0.0.0.0 --open-page=$PAGE " ,
73
- "build" : " webpack --mode production " ,
72
+ "start" : " webpack serve --mode development --disable-host-check --host 0.0.0.0" ,
73
+ "build" : " webpack" ,
74
74
"test" : " TS_NODE_COMPILER_OPTIONS='{\" module\" :\" commonjs\" }' mocha -r ts-node/register tests/**/*.test.ts" ,
75
75
"coverage" : " nyc -r lcov -e .ts -x \" *.test.ts\" npm run test"
76
76
}
Original file line number Diff line number Diff line change 1
1
const HtmlWebPackPlugin = require ( "html-webpack-plugin" ) ;
2
2
const CopyWebPackPlugin = require ( 'copy-webpack-plugin' ) ;
3
3
4
+ var path = require ( 'path' ) ;
5
+
4
6
const htmlPlugin = new HtmlWebPackPlugin ( {
5
7
template : "./src/index.html" ,
6
8
filename : "./index.html"
@@ -55,6 +57,9 @@ module.exports = {
55
57
56
58
devServer : {
57
59
historyApiFallback : true ,
60
+ contentBase : path . join ( __dirname , 'dist' ) ,
61
+ compress : true ,
62
+ port : 8080
58
63
} ,
59
64
60
65
devtool : "source-map" ,
You can’t perform that action at this time.
0 commit comments