From 4ad680c0ff25e4514bff703182427d7e795bcd73 Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Thu, 22 Apr 2021 16:13:40 +0800 Subject: [PATCH] update Former-commit-id: e6087e310678b9b6a373771c004d1a84cb203e70 Former-commit-id: f12ffd80789753aed01f255bd870cdac54a9da8d --- labs/nfs/data/nginx/index.html | 1 + labs/nfs/docker-compose.yml | 31 ++++++++++++------- .../publish/conf/website/conf.d/project.conf | 31 ++++++++++++++++--- .../publish/docker-compose.project.yml | 7 ++++- .../linux-x64/publish/conf/website/nginx.conf | 4 +-- tools/Redis-x64-3.2.100/Config.json | 6 ++++ 6 files changed, 62 insertions(+), 18 deletions(-) create mode 100644 labs/nfs/data/nginx/index.html diff --git a/labs/nfs/data/nginx/index.html b/labs/nfs/data/nginx/index.html new file mode 100644 index 00000000..95d09f2b --- /dev/null +++ b/labs/nfs/data/nginx/index.html @@ -0,0 +1 @@ +hello world \ No newline at end of file diff --git a/labs/nfs/docker-compose.yml b/labs/nfs/docker-compose.yml index b14790e1..e07d6e35 100644 --- a/labs/nfs/docker-compose.yml +++ b/labs/nfs/docker-compose.yml @@ -1,14 +1,23 @@ version: "3.8" services: - # modprobe {nfs,nfsd,rpcsec_gss_krb5} - nfs: - image: erichough/nfs-server:2.2.1 + nginx: + image: nginx:1.18.0 + restart: always + ports: + - 80:80 volumes: - - /lib/modules:/lib/modules:ro - - ./data/nfs:/nfs - - ./conf/exports.conf:/etc/exports:ro - cap_add: - - SYS_ADMIN - - SYS_MODULE - ports: - - 2409:2409 \ No newline at end of file + - nginx-fs:/usr/share/nginx/html:rw +volumes: + nginx-fs: + driver: local + driver_opts: + type: none + o: bind + device: ./data/nginx + nginx-sshfs: + #docker plugin install vieux/sshfs + driver: vieux/sshfs:latest + driver_opts: + sshcmd: root@49.4.92.112:/sshfs + password: dsideal123! + allow_other: "" \ No newline at end of file diff --git a/publish/projects/dslx/linux-x64/publish/conf/website/conf.d/project.conf b/publish/projects/dslx/linux-x64/publish/conf/website/conf.d/project.conf index 67e1bbbf..7567494e 100644 --- a/publish/projects/dslx/linux-x64/publish/conf/website/conf.d/project.conf +++ b/publish/projects/dslx/linux-x64/publish/conf/website/conf.d/project.conf @@ -11,12 +11,35 @@ server { location / { proxy_pass http://127.0.0.1; - } - - location ^~ /platform/hub { - proxy_pass http://127.0.0.1; + if ($http_upgrade ~* "close") { + break; + } proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } +} +server { + listen 80; + server_name rpms.iot.edusoa.com; + + location / { + proxy_pass http://rpms; + } +} +server { + listen 80; + server_name registry.iot.edusoa.com; + + location / { + proxy_pass http://registry:5000; + } +} +server { + listen 80; + server_name docker.iot.edusoa.com; + + location / { + proxy_pass http://docker-registry-web:8080; + } } \ No newline at end of file diff --git a/publish/projects/dslx/linux-x64/publish/docker-compose.project.yml b/publish/projects/dslx/linux-x64/publish/docker-compose.project.yml index 16c12ea2..4d3f00fa 100644 --- a/publish/projects/dslx/linux-x64/publish/docker-compose.project.yml +++ b/publish/projects/dslx/linux-x64/publish/docker-compose.project.yml @@ -23,4 +23,9 @@ services: environment: - REGISTRY_URL=http://registry:5000/v2 - REGISTRY_TRUST_ANY_SSL=true - - REGISTRY_NAME=localhost:5000 hyper/docker-registry-web \ No newline at end of file + - REGISTRY_NAME=registry.iot.edusoa.com hyper/docker-registry-web + rpms: + image: nginx:1.18.0 + restart: always + volumes: + - ./data/rpms:/usr/share/nginx/html \ No newline at end of file diff --git a/publish/src/linux-x64/publish/conf/website/nginx.conf b/publish/src/linux-x64/publish/conf/website/nginx.conf index 495fb2ee..2b504d46 100644 --- a/publish/src/linux-x64/publish/conf/website/nginx.conf +++ b/publish/src/linux-x64/publish/conf/website/nginx.conf @@ -26,8 +26,8 @@ http { } server { - listen 0.0.0.0:80; - server_name localhost; + listen 80; + server_name default; absolute_redirect off; location / { diff --git a/tools/Redis-x64-3.2.100/Config.json b/tools/Redis-x64-3.2.100/Config.json index 3d3eb5cd..a64443bc 100644 --- a/tools/Redis-x64-3.2.100/Config.json +++ b/tools/Redis-x64-3.2.100/Config.json @@ -5,6 +5,12 @@ "ip": "localhost", "port": 6379, "auth": "aA123456!" + }, + { + "name": "imtest", + "ip": "127.0.0.1", + "port": 6379, + "auth": "" } ] } \ No newline at end of file