# Combined VRE (Virtual Research Environment) Stack # JupyterHub + Apache Zeppelin behind Traefik # Usage: docker compose -f vre/docker-compose.yml up -d version: "3.9" services: jupyterhub: build: context: ./jupyterhub dockerfile: Dockerfile image: smartcity-jupyterhub:latest container_name: jupyterhub restart: unless-stopped networks: - smartcity-shared volumes: - jupyterhub_data:/srv/jupyterhub labels: - "traefik.enable=true" - "traefik.http.routers.jupyterhub.rule=Host(`jupyter.digitribe.fr`)" - "traefik.http.routers.jupyterhub.entrypoints=websecure" - "traefik.http.routers.jupyterhub.tls.certresolver=letsencrypt" - "traefik.http.routers.jupyterhub.service=jupyterhub-svc" - "traefik.http.services.jupyterhub-svc.loadbalancer.server.port=8000" - "traefik.http.services.jupyterhub-svc.loadbalancer.passhostheader=true" - "traefik.docker.network=smartcity-shared" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/hub/health"] interval: 30s timeout: 10s retries: 5 start_period: 30s zeppelin: image: apache/zeppelin:0.11.2 container_name: zeppelin restart: unless-stopped networks: - smartcity-shared volumes: - ./zeppelin/zeppelin-site.xml:/opt/zeppelin/conf/zeppelin-site.xml - ./zeppelin/shiro.ini:/opt/zeppelin/conf/shiro.ini - zeppelin_notebooks:/notebook - zeppelin_logs:/logs environment: - ZEPPELIN_ADDR=0.0.0.0 - ZEPPELIN_PORT=8080 - ZEPPELIN_NOTEBOOK_DIR=/notebook - ZEPPELIN_MEM=-Xmx2g - ZEPPELIN_INTP_MEM=-Xmx2g - ZEPPELIN_LOG_DIR=/logs - ZEPPELIN_WEBSOCKET_MAX_TEXT_MESSAGE_SIZE=10240000 labels: - "traefik.enable=true" - "traefik.http.routers.zeppelin.rule=Host(`zeppelin.digitribe.fr`)" - "traefik.http.routers.zeppelin.entrypoints=websecure" - "traefik.http.routers.zeppelin.tls.certresolver=letsencrypt" - "traefik.http.routers.zeppelin.service=zeppelin-svc" - "traefik.http.services.zeppelin-svc.loadbalancer.server.port=8080" - "traefik.http.services.zeppelin-svc.loadbalancer.passhostheader=true" - "traefik.docker.network=smartcity-shared" healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/api/version"] interval: 30s timeout: 10s retries: 5 start_period: 120s networks: smartcity-shared: external: true volumes: jupyterhub_data: driver: local zeppelin_notebooks: driver: local zeppelin_logs: driver: local