Huan He commited on
Commit
6286ce5
·
1 Parent(s): 9482228

update for sciviz

Browse files
conf/sciviz/Dockerfile ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # serve the data with nginx
2
+ FROM nginx:alpine
3
+
4
+ # set the working folder in the container
5
+ WORKDIR /usr/share/nginx/html
6
+
7
+ # copy the nginx configuration
8
+ COPY ./index.html ./
9
+ COPY ./50x.html ./
conf/sciviz/default.conf ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ server {
2
+ listen 80;
3
+ listen [::]:80;
4
+ server_name localhost;
5
+
6
+ location / {
7
+ root /usr/share/nginx/html;
8
+ index index.html index.htm;
9
+
10
+ # Only serve JSON and TSV files
11
+ try_files $uri $uri/ =404;
12
+
13
+ # Enable gzip compression for JSON and TSV
14
+ gzip on;
15
+ gzip_types application/json text/tab-separated-values;
16
+ gzip_min_length 1000;
17
+ gzip_vary on;
18
+
19
+ # Set correct content type for TSV files
20
+ default_type application/json;
21
+ types {
22
+ application/json json;
23
+ text/tab-separated-values tsv;
24
+ }
25
+
26
+ # Enable CORS for specific origin and allow credentials
27
+ add_header 'Access-Control-Allow-Origin' 'https://sciviz.org' always;
28
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
29
+ add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, Authorization';
30
+ add_header 'Access-Control-Allow-Credentials' 'true' always;
31
+ add_header 'Access-Control-Expose-Headers' 'Content-Range' always;
32
+
33
+ # Handle preflight requests
34
+ if ($request_method = OPTIONS) {
35
+ add_header 'Access-Control-Allow-Origin' 'https://sciviz.org';
36
+ add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, PUT, DELETE';
37
+ add_header 'Access-Control-Allow-Headers' 'Origin, X-Requested-With, Content-Type, Accept, Authorization';
38
+ add_header 'Access-Control-Allow-Credentials' 'true';
39
+ add_header 'Access-Control-Expose-Headers' 'Content-Range';
40
+ return 204;
41
+ }
42
+ }
43
+
44
+ # redirect server error pages to the static page /50x.html
45
+ #
46
+ error_page 500 502 503 504 /50x.html;
47
+ location = /50x.html {
48
+ root /usr/share/nginx/html;
49
+ }
50
+ }
51
+
conf/sciviz/docker-compose.yml ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: bike-dataset
2
+
3
+ services:
4
+ ds:
5
+ build:
6
+ context: ../../
7
+ dockerfile: ./conf/sciviz/Dockerfile
8
+ container_name: bike-ds
9
+ working_dir: /usr/share/nginx/html
10
+ environment:
11
+ NODE_ENV: sciviz
12
+ volumes:
13
+ - ./default.conf:/etc/nginx/conf.d/default.conf
14
+ - ../../data:/usr/share/nginx/html/dataset
15
+ ports:
16
+ - 28256:80
17
+ restart: always
18
+ networks:
19
+ - bikenet
20
+
21
+ networks:
22
+ bikenet:
23
+ driver: bridge
data/sciviz/massw-191k.meta.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2d729764a82f0982afc7ee8e10f4b9f7473db95bc33a4287c836c40d7ec2b62c
3
+ size 822
data/sciviz/massw-191k.thumbnail.jpg ADDED

Git LFS Details

  • SHA256: 4c8e8869ac477268cdf68e85fe853ba85c3abf2ceec12e79305f225548590817
  • Pointer size: 130 Bytes
  • Size of remote file: 62.7 kB
data/sciviz/massw-191k.tsv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0faff004871cb461c6a9eb8e45a0cb4760c00364b45b72eaceb7faf59f15e6e1
3
+ size 175172425