First complete version
This commit is contained in:
119
obijupyterhub/docker-compose.yml
Normal file
119
obijupyterhub/docker-compose.yml
Normal file
@@ -0,0 +1,119 @@
|
||||
services:
|
||||
jupyterhub:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.hub
|
||||
container_name: jupyterhub
|
||||
hostname: jupyterhub
|
||||
image: jupyterhub-hub:latest
|
||||
expose:
|
||||
- "8000"
|
||||
volumes:
|
||||
# Access to Docker socket to spawn student containers
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
# JupyterHub database persistence
|
||||
- data:/srv/jupyterhub
|
||||
# The Jupyter user volumes
|
||||
- users:/volumes
|
||||
# Mount config file directly (for easy modifications)
|
||||
- ./jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py:ro
|
||||
networks:
|
||||
- jupyterhub-network
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
# Shared password for all students
|
||||
JUPYTERHUB_PASSWORD: metabar2025
|
||||
# Admin password (for installing R packages)
|
||||
JUPYTERHUB_ADMIN_PASSWORD: admin2025
|
||||
# Optional environment variables
|
||||
DOCKER_NOTEBOOK_DIR: /home/jovyan/work
|
||||
|
||||
# ---------- Nginx ----------
|
||||
|
||||
caddy:
|
||||
container_name: jupyterhub-caddy
|
||||
hostname: jupytercaddy
|
||||
image: caddy:latest
|
||||
ports:
|
||||
- "8888:80"
|
||||
volumes:
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile
|
||||
- caddy-data:/data
|
||||
- caddy-config:/config
|
||||
- web:/srv # Votre app
|
||||
networks:
|
||||
- jupyterhub-network
|
||||
restart: unless-stopped
|
||||
|
||||
# ---------- SFTPGo ----------
|
||||
sftpgo:
|
||||
image: drakkan/sftpgo:latest
|
||||
container_name: jupyterhub-sftpgo
|
||||
hostname: jupytersftp
|
||||
command: sftpgo serve --loaddata-from /config/local_config.json --loaddata-clean
|
||||
expose:
|
||||
- "2022"
|
||||
- "8080"
|
||||
environment:
|
||||
SFTPGO_DATA_PROVIDER__CREATE_DEFAULT_ADMIN: true
|
||||
SFTPGO_DEFAULT_ADMIN_USERNAME: admin
|
||||
SFTPGO_DEFAULT_ADMIN_PASSWORD: admin2025
|
||||
SFTPGO_HTTPD__BINDINGS__0__CLIENT_IP_PROXY_HEADER: X-Real-IP
|
||||
volumes:
|
||||
- shared:/volumes/shared
|
||||
- course:/volumes/course
|
||||
- web:/volumes/web
|
||||
- ./sftpgo_config.json:/config/local_config.json:ro
|
||||
|
||||
networks:
|
||||
- jupyterhub-network
|
||||
restart: unless-stopped
|
||||
|
||||
networks:
|
||||
jupyterhub-network:
|
||||
name: jupyterhub-network
|
||||
driver: bridge
|
||||
|
||||
volumes:
|
||||
data:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: ../jupyterhub_volumes/jupyterhub
|
||||
shared:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: ../jupyterhub_volumes/shared
|
||||
course:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: ../jupyterhub_volumes/course
|
||||
web:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: ../jupyterhub_volumes/web
|
||||
caddy-data:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: ../jupyterhub_volumes/caddy/data
|
||||
caddy-config:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: ../jupyterhub_volumes/caddy/config
|
||||
users:
|
||||
driver: local
|
||||
driver_opts:
|
||||
type: none
|
||||
o: bind
|
||||
device: ../jupyterhub_volumes/users
|
||||
Reference in New Issue
Block a user