Skip to content

Commit

Permalink
feat: add nginx import file download (vesoft-inc#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
nianiaJR authored and NicolaCage committed Jan 10, 2020
1 parent 4ccce2e commit a7aa07e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 62 deletions.
5 changes: 4 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# English: the WORKDING_DIR mapped in the docker
# 中文: 这个是配置的 WORKING_DIR 将会映射到docker中的目录
MAPPING_DOCKER_DIR=/import-file
# English: Set the directory to upload files. With this directory set, docker can access files on your local host. No extra space is allowed in the directory.
# 中文:上传文件目录设置,以便容器内部能共享到本机的文件夹,拥有读写权限,目录不支持有空格
WORKING_DIR={please input your real local path}
WORKING_DIR=./example
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
example/tmp
9 changes: 5 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ services:
networks:
- nebula-web
web:
image: vesoft/nebula-web-console:0.0.2
image: vesoft/nebula-web-console:0.0.5
environment:
USER: root
WORKING_DIR: ${WORKING_DIR}
WORKING_DIR: ${MAPPING_DOCKER_DIR}
ports:
- 7001
depends_on:
- client
volumes:
- ${WORKING_DIR}:${WORKING_DIR}:rw
- ${WORKING_DIR}:${MAPPING_DOCKER_DIR}:rw
networks:
- nebula-web
importer:
Expand All @@ -28,14 +28,15 @@ services:
ports:
- 5699
volumes:
- ${WORKING_DIR}:${WORKING_DIR}:rw
- ${WORKING_DIR}:${MAPPING_DOCKER_DIR}:rw
command:
- "--port=5699"
- "--callback=http://nginx:7001/api/import/finish"
nginx:
image: nginx:alpine
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/nebula.conf
- ${WORKING_DIR}:${MAPPING_DOCKER_DIR}:rw
depends_on:
- client
- web
Expand Down
52 changes: 0 additions & 52 deletions example/tmp/config.yaml

This file was deleted.

Empty file removed example/tmp/err/Vertex 0Fail.scv
Empty file.
5 changes: 0 additions & 5 deletions example/tmp/import.log

This file was deleted.

5 changes: 5 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ server {
proxy_set_header X-Forwarded-Host $server_name;
}

location /import-file/ {
root /;
autoindex on;
}

location ~ ^/api-nebula/([A-Za-z0-9\/]+) {
proxy_pass http://client:8080/api/$1;
}
Expand Down

0 comments on commit a7aa07e

Please sign in to comment.