Files
OBIJupyterHub/docker-compose.yml
2025-10-15 09:06:58 +02:00

37 lines
1012 B
YAML

services:
jupyterhub:
build:
context: .
dockerfile: Dockerfile.hub
container_name: jupyterhub
image: jupyterhub-hub:latest
ports:
- "8888:8000"
volumes:
# Access to Docker socket to spawn student containers
- /var/run/docker.sock:/var/run/docker.sock
# JupyterHub database persistence
- jupyterhub-data:/srv/jupyterhub
# 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
networks:
jupyterhub-network:
name: jupyterhub-network
driver: bridge
volumes:
jupyterhub-data:
jupyterhub-shared:
jupyterhub-course: