File tree Expand file tree Collapse file tree 9 files changed +127
-12
lines changed Expand file tree Collapse file tree 9 files changed +127
-12
lines changed Original file line number Diff line number Diff line change
1
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
+
3
+ # dependencies
4
+ node_modules
5
+ /.pnp
6
+ .pnp.js
7
+
8
+ # testing
9
+ /coverage
10
+
11
+ # production
12
+ build
13
+
14
+ # misc
15
+ .DS_Store
16
+ .env.local
17
+ .env.development.local
18
+ .env.test.local
19
+ .env.production.local
20
+
21
+ npm-debug.log *
22
+ yarn-debug.log *
23
+ yarn-error.log *
24
+
25
+ /server /dataset /
26
+
27
+ .vscode
28
+
29
+ safety
30
+ dist
31
+
32
+ coverage
33
+
34
+ .cache
35
+ .eslintcache
36
+
37
+ * .cert
38
+ * .key
39
+ * .pem
40
+
41
+ packages /frontend /public /datasets /*
42
+
43
+ * service.json
44
+ * .db
45
+
46
+ for_test /
47
+ sasl-0.3.1-cp310-cp310-win_amd64.whl
48
+ __pycache__ /
49
+ .idea /
50
+ connect.db
51
+ not_sqlalchemy /
52
+ run_flask_app.bat
53
+ venv
54
+
55
+ dataset-with-metas.json
Original file line number Diff line number Diff line change 1
- FROM node:16 as build-stage
1
+ FROM node:16 AS build-stage
2
+
2
3
COPY . /app
4
+
3
5
WORKDIR /app
4
- ENV NODE_OPTIONS=--max_old_space_size=4096
5
- RUN npm config set registry https://registry.npmmirror.com
6
- RUN yarn config set registry https://registry.npmmirror.com
6
+
7
7
RUN yarn install
8
- RUN yarn workspace rath-client build2
9
8
10
- FROM nginx:latest
11
- COPY --from=build-stage /app/packages/rath-client/build /usr/share/nginx/html
12
- CMD ["nginx" , "-g" , "daemon off;" ]
9
+ RUN yarn workspace rath-client buildOnDocker
10
+
11
+ FROM nginx:1.24
12
+
13
+ COPY --from=node-builder /app/packages/rath-client/build /usr/share/nginx/html
14
+ COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf
15
+
16
+ ENTRYPOINT ["nginx" , "-g" , "daemon off;" ]
Original file line number Diff line number Diff line change
1
+ version : " 2"
2
+
1
3
services :
2
- frontend :
4
+ base :
5
+ restart : always
3
6
build :
4
7
context : .
5
8
dockerfile : client.dockerfile
6
9
ports :
7
- - 8080:80
10
+ - 9083:80
11
+
12
+ connector-api :
13
+ restart : always
14
+ network_mode : service:base
15
+ build :
16
+ context : ./services/connector
17
+ dockerfile : Dockerfile
18
+
19
+ prediction-api :
20
+ restart : always
21
+ network_mode : service:base
22
+ build :
23
+ context : ./services/prediction
24
+ dockerfile : Dockerfile
Original file line number Diff line number Diff line change
1
+ server {
2
+ listen 80 ;
3
+ server_name localhost;
4
+
5
+ location / {
6
+ root /usr/share/nginx/html;
7
+ index index.html index.htm;
8
+ }
9
+
10
+ error_page 500 502 503 504 /50x.html;
11
+ location = /50x.html {
12
+ root /usr/share/nginx/html;
13
+ }
14
+
15
+ location /connector/api {
16
+ proxy_pass http://localhost:5001/api;
17
+ }
18
+
19
+ location /api/train_test {
20
+ proxy_pass http://localhost:5533/api/train_test;
21
+ }
22
+
23
+ }
Original file line number Diff line number Diff line change 80
80
"build:renderer" : " yarn workspace vega-painter-renderer build" ,
81
81
"start" : " react-app-rewired start" ,
82
82
"build" : " npm run build:utils && npm run build:scenegraph && npm run build:renderer && npm run build:client" ,
83
+ "buildOnDocker" : " npm run build:utils && npm run build:scenegraph && npm run build:renderer && GENERATE_SOURCEMAP=false react-app-rewired --max_old_space_size=4096 build" ,
83
84
"build:client" : " GENERATE_SOURCEMAP=false react-app-rewired --max_old_space_size=8000 build" ,
84
85
"buildForAnalysis" : " react-app-rewired build" ,
85
86
"test" : " jest -c ./jest.config.js --passWithNoTests --no-cache" ,
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export interface IPredictResult {
51
51
const PREDICT_API_KEY = 'prediction_service' ;
52
52
function getPredictAPIPath ( path = "/api/train_test" ) {
53
53
const baseURL = new URL ( window . location . href ) ;
54
- const serviceURL = new URL ( baseURL . searchParams . get ( PREDICT_API_KEY ) || localStorage . getItem ( PREDICT_API_KEY ) || "http://127.0.0.1:5533/api/train_test" ) ;
54
+ const serviceURL = new URL ( baseURL . searchParams . get ( PREDICT_API_KEY ) || localStorage . getItem ( PREDICT_API_KEY ) || window . location . href ) ;
55
55
serviceURL . pathname = path ;
56
56
return serviceURL . toString ( ) ;
57
57
}
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ interface DatabaseDataProps {
68
68
export const inputWidth = '180px' ;
69
69
70
70
export const defaultServers : readonly string [ ] = [
71
+ "/connector" ,
71
72
'https://gateway.kanaries.net/connector' ,
72
- 'https://kanaries.cn/connector' ,
73
73
] ;
74
74
75
75
const MAX_SERVER_COUNT = 5 ;
Original file line number Diff line number Diff line change
1
+ FROM python:3.10.7
2
+
3
+ WORKDIR /prediction
4
+
5
+ COPY . /prediction
6
+
7
+ RUN pip3 install --trusted-host pypi.python.org -r requirements.txt
8
+
9
+ CMD python3 -u /prediction/main.py
Original file line number Diff line number Diff line change
1
+ Flask
2
+ Flask_cors
3
+ gevent
4
+ scikit-learn == 1.3.0
5
+ xgboost == 1.7.6
6
+ pandas == 2.0.3
You can’t perform that action at this time.
0 commit comments