Files
OBIJupyterHub/docker-compose.yml

37 lines
1012 B
YAML
Raw Normal View History

2025-10-14 17:40:41 +02:00
services:
jupyterhub:
build:
context: .
dockerfile: Dockerfile.hub
container_name: jupyterhub
image: jupyterhub-hub:latest
ports:
2025-10-15 07:15:05 +02:00
- "8888:8000"
2025-10-14 17:40:41 +02:00
volumes:
2025-10-15 07:10:44 +02:00
# Access to Docker socket to spawn student containers
2025-10-14 17:40:41 +02:00
- /var/run/docker.sock:/var/run/docker.sock
2025-10-15 07:10:44 +02:00
# JupyterHub database persistence
2025-10-14 17:40:41 +02:00
- jupyterhub-data:/srv/jupyterhub
2025-10-15 07:10:44 +02:00
# Mount config file directly (for easy modifications)
2025-10-14 17:40:41 +02:00
- ./jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py:ro
networks:
- jupyterhub-network
restart: unless-stopped
environment:
2025-10-15 07:10:44 +02:00
# Shared password for all students
2025-10-14 17:40:41 +02:00
JUPYTERHUB_PASSWORD: metabar2025
2025-10-15 07:15:05 +02:00
# Admin password (for installing R packages)
JUPYTERHUB_ADMIN_PASSWORD: admin2025
2025-10-15 07:10:44 +02:00
# Optional environment variables
2025-10-14 17:40:41 +02:00
DOCKER_NOTEBOOK_DIR: /home/jovyan/work
networks:
jupyterhub-network:
name: jupyterhub-network
driver: bridge
volumes:
jupyterhub-data:
jupyterhub-shared:
2025-10-15 07:10:44 +02:00
jupyterhub-course: