add nginx but notebook show connecting’
This commit is contained in:
@@ -35,6 +35,17 @@ services:
|
|||||||
DOCKER_NOTEBOOK_IMAGE: hotwa/notebook:latest
|
DOCKER_NOTEBOOK_IMAGE: hotwa/notebook:latest
|
||||||
# Notebook directory inside user image
|
# Notebook directory inside user image
|
||||||
DOCKER_NOTEBOOK_DIR: /home/jovyan/work
|
DOCKER_NOTEBOOK_DIR: /home/jovyan/work
|
||||||
|
# nginx:
|
||||||
|
# image: nginx:latest
|
||||||
|
# volumes:
|
||||||
|
# - ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||||
|
# ports:
|
||||||
|
# - "18188:80"
|
||||||
|
# depends_on:
|
||||||
|
# - hub
|
||||||
|
# networks:
|
||||||
|
# - jupyterhub-network
|
||||||
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
jupyterhub-data:
|
jupyterhub-data:
|
||||||
|
|||||||
26
nginx.conf
Normal file
26
nginx.conf
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
worker_processes 1;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
map $http_upgrade $connection_upgrade {
|
||||||
|
default upgrade;
|
||||||
|
'' close;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://hub:8000;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection $connection_upgrade;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user