-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
58 lines (53 loc) · 1.79 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
version: "3.8"
services:
# config for reverse proxy
reverse-proxy:
image: traefik:latest
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.http.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
# - /etc/certs:/etc/certs
# config for single user servers
jupyter_server:
image: hannsen/cell-tissue-networks_server:latest
ports:
- '8050:8050'
networks:
- default
command: echo
# config for Hub
jupyterhub:
depends_on:
- "reverse-proxy"
build:
dockerfile: ./Dockerfile
image: ctn_hub:latest
container_name: ctn_hub
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Give access to Docker socket.
- jupyterhub_data:/data:rw # Add a data partition for data storage.
environment: # Env variables passed to the Hub process.
- DOCKER_JUPYTER_CONTAINER=hannsen/cell-tissue-networks_server:latest
- DOCKER_NETWORK_NAME=ctn_default
- HUB_IP=ctn_hub
- HOST
networks:
- default
labels: # Traefik configuration.
- "traefik.enable=true" # enable Traefik for this service
- "traefik.frontend.rule=Host:${HOST}" # apply rule for frontend
- "traefik.docker.network=ctn_default" # use internal docker network
- "traefik.http.routers.jupyterhub.rule=Host(`${HOST}`)" # apply routing through traefik
volumes:
jupyterhub_data:
name: 'ctn_data'
networks:
default:
name: ctn_default