add nginx proxy

This commit is contained in:
2024-02-19 18:16:32 +08:00
parent 3b53f31d9e
commit 8e0fc3c85d
3 changed files with 45 additions and 18 deletions

View File

@@ -35,17 +35,21 @@ services:
DOCKER_NOTEBOOK_IMAGE: hotwa/notebook:latest
# Notebook directory inside user image
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
nginx:
image: nginx:latest
container_name: nginx-proxy
depends_on:
- hub
volumes:
- "./nginx.conf:/etc/nginx/nginx.conf:ro"
- "./nginx-selfsigned.crt:/etc/ssl/certs/nginx-selfsigned.crt:ro"
- "./nginx-selfsigned.key:/etc/ssl/private/nginx-selfsigned.key:ro"
- "./dhparam.pem:/etc/ssl/certs/dhparam.pem:ro"
ports:
- "50000:443"
networks:
- jupyterhub-network
volumes:
jupyterhub-data: