-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (69 loc) · 2.13 KB
/
docker-compose.yml
File metadata and controls
75 lines (69 loc) · 2.13 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
version: '2'
volumes:
training-volume:
ssh-keygen-volume:
services:
# traefik reverse proxy to expose the jupyter and jenkins servers over ssl via a common hostname
traefik:
image: traefik:v1.7
mem_limit: 512m
command: --debug=True --docker --docker.watch --web --web.address=:28443 --entryPoints='Name:http Address::80' --entryPoints='Name:https Address::443' --defaultEntryPoints='http,https'
ports:
# Not currently serving content here
- '8443:443'
- '8888:80'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
# This is a single shot container that creates a set of ssh keys per instance
# and deploys them to a persistent volume shared between the sandbox and
# jupyter container. By doing this, we don't need to ship keys with the image
# or source.
ssh-keygen:
image: agaveplatform/jupyter-notebook:5.2-slim
entrypoint: /bin/bash
command: /usr/local/bin/keygen.sh
user: jovyan
env_file:
- training.env
volumes:
- ssh-keygen-volume:/home/jovyan/.ssh
- ./docker/ssh-keygen/keygen.sh:/usr/local/bin/keygen.sh
jupyter:
image: agaveplatform/jupyter-notebook:5.2-slim
mem_limit: 2048m
restart: on-failure
depends_on:
- ssh-keygen
env_file:
- training.env
environment:
- GRANT_SUDO=yes
volumes:
- ssh-keygen-volume:/home/jovyan/.ssh
- training-volume:/home/jovyan/work
labels:
- "traefik.port=8888"
- "traefik.protocol=http"
- "traefik.tags=testuser,jupyter"
- "traefik.backend=testuser-training"
- "traefik.frontend.rule=PathPrefix:/"
sandbox:
image: agaveplatform/training-sandbox:2.2.27
mem_limit: 2048m
privileged: True
restart: on-failure
# This port needs to be exposed for ngrok.
ports:
- '10022:22'
depends_on:
- ssh-keygen
env_file:
- training.env
environment:
- VM_MACHINE=$$ENVIRONMENT-node-$$AGAVE_USERNAME
volumes:
- ssh-keygen-volume:/home/jovyan/.ssh
- training-volume:/home/jovyan/work
- /var/run/docker.sock:/var/run/docker.sock
labels:
- traefik.enable=false