-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
108 lines (94 loc) · 2.45 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
# JupyterHub docker-compose configuration file
version: "3.6"
services:
nginx-proxy:
labels:
"com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy": "true"
image: jwilder/nginx-proxy:${NGINX_PROXY_VERSION}
ports:
- "80:80"
- "443:443"
volumes:
- "vhost:/etc/nginx/vhost.d"
- "html:/usr/share/nginx/html"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "certs:/etc/nginx/certs"
restart: always
env_file:
- .config/nginx
letsencrypt-nginx-proxy-companion:
image: jrcs/letsencrypt-nginx-proxy-companion:${PROXY_COMPANION_VERSION}
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "vhost:/etc/nginx/vhost.d"
- "html:/usr/share/nginx/html"
- "certs:/etc/nginx/certs"
restart: always
mmt-server:
image: kwarc/mmt:${MMT_VERSION}
container_name: mmt-server
restart: always
command: ["-w", "--file=/content/MathHub/meta/inf/mathhub.msl"]
environment:
VIRTUAL_PORT: 9000
env_file:
- .config/mmt
- .config/mmt-archives
volumes:
- "mmtdata:/content"
hub-db:
image: postgres:9.5
container_name: jupyterhub-db
restart: always
environment:
POSTGRES_DB: ${POSTGRES_DB}
PGDATA: ${DB_VOLUME_CONTAINER}
env_file:
- .config/postgres
volumes:
- "db:${DB_VOLUME_CONTAINER}"
hub:
image: mathhub/jupyter
depends_on:
- hub-db
restart: always
container_name: jupyterhub
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:rw"
- "data:${DATA_VOLUME_CONTAINER}"
ports:
- "80"
environment:
MMT_VOLUME_HOST: ${MMT_VOLUME_HOST}
VIRTUAL_PORT: 80
DOCKER_NETWORK_NAME: ${DOCKER_NETWORK_NAME}
DOCKER_NOTEBOOK_IMAGE: ${DOCKER_NOTEBOOK_IMAGE}
DOCKER_NOTEBOOK_DIR: ${DOCKER_NOTEBOOK_DIR}
DOCKER_SPAWN_CMD: ${DOCKER_SPAWN_CMD}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_HOST: hub-db
env_file:
- .config/postgres
- .config/jupyterhub
command: >
jupyterhub -f /srv/jupyterhub/jupyterhub_config.py
volumes:
data:
external:
name: ${DATA_VOLUME_HOST}
db:
external:
name: ${DB_VOLUME_HOST}
mmtdata:
external:
name: ${MMT_VOLUME_HOST}
portainer:
vhost:
html:
certs:
networks:
default:
external:
name: ${DOCKER_NETWORK_NAME}