-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
166 lines (148 loc) · 6.29 KB
/
docker-compose.yml
File metadata and controls
166 lines (148 loc) · 6.29 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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
version: '3.4'
services:
mongo:
image: mongo:3.6
restart: unless-stopped
container_name: mongo
volumes:
- /mnt/data1/bmeg/mongo-data:/data/db
grip:
image: bmeg/grip:0.7.1
restart: unless-stopped
# build: grip
container_name: grip
volumes:
- ./secrets/grip_config.yml:/config/grip_config.yml
entrypoint: ["grip", "server", "--config", "/config/grip_config.yml"]
ports:
- 8201:8201
- 8202:8202
depends_on:
- mongo
nginx:
build: nginx
restart: unless-stopped
container_name: nginx
# use env_file to overwrite env values
# see GRIP_SERVER
env_file:
- secrets/nginx.env
ports:
- 80:80
- 443:443
volumes:
# content
- /mnt/data2/bmeg/deployment/nginx/bmeg-site/bmegio.ohsu.edu/public:/usr/share/nginx/bmegio.ohsu.edu
- /mnt/data2/bmeg/deployment/nginx/bmeg-site/bmeg.io/public:/usr/share/nginx/bmeg.io
- /mnt/data2/bmeg/deployment/nginx/usr/share/nginx/gen3-ohsu.ddns.net:/usr/share/nginx/gen3-ohsu.ddns.net
- /mnt/data2/bmeg/bmeg-data:/usr/share/nginx/bmegio.ohsu.edu.data
- /mnt/data2/bmeg/bmeg-data:/usr/share/nginx/bmeg.io.data
- /mnt/data2/bmeg/bmeg-share:/usr/share/nginx/bmegio.ohsu.edu.share
- /mnt/data2/bmeg/bmeg-share:/usr/share/nginx/bmeg.io.share
- /mnt/data2/recount/data:/usr/share/nginx/recount.bio.data
- /mnt/data2/bmeg/deployment/nginx/usr/share/nginx/recount.bio:/usr/share/nginx/recount.bio
# config
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/nginx.conf:/etc/nginx/nginx.conf
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/http.conf.d/env.conf:/etc/nginx/http.conf.d/env.conf
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/protected.conf:/etc/nginx/protected.conf
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/grip-bmeg.io.conf:/etc/nginx/grip-bmeg.io.conf
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/grip-bmegio.ohsu.edu.conf:/etc/nginx/grip-bmegio.ohsu.edu.conf
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/lua/nginx-google-oauth/access.lua:/etc/nginx/lua/nginx-google-oauth/access.lua
# specific sites
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/sites-enabled/bmegio.ohsu.edu:/etc/nginx/sites-enabled/bmegio.ohsu.edu:ro
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/sites-enabled/gen3-ohsu.ddns.net:/etc/nginx/sites-enabled/gen3-ohsu.ddns.net:ro
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/sites-enabled/bmeg-jupyter.ddns.net:/etc/nginx/sites-enabled/bmeg-jupyter.ddns.net:ro
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/sites-enabled/bmeg.io:/etc/nginx/sites-enabled/bmeg.io:ro
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/sites-enabled/recount.bio:/etc/nginx/sites-enabled/recount.bio:ro
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/sites-enabled/methylation.recount.bio:/etc/nginx/sites-enabled/methylation.recount.bio:ro
# testing
- /mnt/data2/bmeg/deployment/nginx/etc/nginx/sites-enabled/commons.bmeg.io:/etc/nginx/sites-enabled/commons.bmeg.io:ro
# - ./nginx/etc/nginx/sites-enabled/bmegio-test.ddns.net:/etc/nginx/sites-enabled/bmegio-test.ddns.net:ro
# - ./nginx/bmeg-site/bmegio-test.ddns.net/public:/usr/share/nginx/bmegio-test.ddns.net
# - ./nginx/etc/nginx/grip-bmegio-test.ddns.net.conf:/etc/nginx/grip-bmegio-test.ddns.net.conf
# for letsencrypt
- /mnt/data2/bmeg/deployment/data/certbot/conf:/etc/letsencrypt
- /mnt/data2/bmeg/deployment/data/certbot/www:/var/www/certbot
# startup
- /mnt/data2/bmeg/deployment/nginx/run.sh:/etc/nginx/run.sh
depends_on:
- grip
- jupyterhub
- cadvisor
# for letsencrypt
certbot:
image: certbot/certbot
restart: unless-stopped
container_name: certbot
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
# python & go container for loading data, running tests, etc.
etl:
build: etl
restart: unless-stopped
container_name: etl
volumes:
# mount bmeg-etl directory, to have access to `outputs/`
- /mnt/data2/bmeg/bmeg-data/:/etl/bmeg-data
# mount bmeg-etl
- /mnt/data2/bmeg/bmeg-etl:/etl/bmeg-etl
depends_on:
- grip
- mongo
# see https://opendreamkit.org/2018/10/17/jupyterhub-docker/
jupyterhub:
build: jupyterhub # Build the container from this folder.
restart: unless-stopped
container_name: jupyterhub # The service will use this container name.
volumes: # Give access to Docker socket.
- /var/run/docker.sock:/var/run/docker.sock
- ./secrets/userlist:/srv/jupyterhub/userlist
- ./secrets/jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py
- /mnt/data1/bmeg/jupyter-data:/data
environment: # Env variables passed to the Hub process.
DOCKER_NOTEBOOK_IMAGE: jupyterlab_img
DOCKER_NETWORK_NAME: deployment_default
HUB_IP: jupyterhub
env_file:
- secrets/jupyter.env
- secrets/oauth.env
depends_on:
- grip
# notebook image, build via: `dc build jupyterlab`
# The extra line command: echo is there so that,
# when Docker Compose starts the service, it terminates immediately.
# Indeed this image is meant to be loaded by the Hub, not by Compose.
jupyterlab:
build: jupyterlab
image: jupyterlab_img
restart: unless-stopped
command: echo
# see https://www.neteye-blog.com/2018/04/how-to-monitor-docker-containers-using-cadvisor-part-1/
cadvisor:
container_name: cadvisor # The service will use this container name.
image: google/cadvisor:latest
restart: unless-stopped
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
ports:
- 8080:9090
#
# # docker volume create --name=jupyterhub-data
# # docker volume create --name=jupyterhub-db-data
# volumes:
# data:
# external:
# name: ${DATA_VOLUME_HOST}
# db:
# external:
# name: ${DB_VOLUME_HOST}
# networks:
# default:
# external:
# name: ${DOCKER_NETWORK_NAME}