-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·97 lines (92 loc) · 2.22 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
version: '3.7'
services:
db:
image: postgres:latest
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
resources:
reservations:
memory: 128M
limits:
memory: 256M
command: -c 'config_file=/etc/postgresql.conf'
configs:
- source: postgres
target: /etc/postgresql.conf
networks:
- hub_network
environment:
POSTGRES_USER: 'hub'
POSTGRES_PASSWORD: '1qaz2wsx'
POSTGRES_DB: 'hub'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- data/postgres:/var/lib/postgresql/data
- logs/postgres:/var/lib/postgresql/pg_log
# logging:
# driver: gelf
# options:
# gelf-address: "udp://10.80.0.5:12201"
nginx:
image: nginx:latest
deploy:
replicas: 1
resources:
reservations:
memory: 128M
limits:
memory: 256M
configs:
- source: nginx_log
target: /etc/nginx/nginx.conf
- source: nginx
target: /etc/nginx/conf.d/default.conf
ports:
- 80:80
- 443:443
networks:
- hub_network
volumes:
- logs/nginx:/var/log/nginx
- configs/nginx/PRIVATE.pem:/etc/nginx/certs/PRIVATE.pem
- configs/nginx/PUBLIC.pem:/etc/nginx/certs/PUBLIC.pem
# logging:
# driver: gelf
# options:
# gelf-address: "udp://10.80.0.5:12201"
hub:
image: khabel/jupyterhub:latest
deploy:
replicas: 1
placement:
constraints: [node.role == manager]
environment:
AES_KEY: 'Ab123456'
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- data/users:/storage/nfs
- logs/jupyterhub:/srv/jupyterhub/logs
- configs/notebook:/srv/jupyterhub/notebooks
- ./jupyterhub_config.py:/srv/jupyterhub/jupyterhub_config.py
networks:
- hub_network
ports:
- "8000:8000"
depends_on:
- db_dev
# logging:
# driver: gelf
# options:
# gelf-address: "udp://10.80.0.5:12201"
networks:
hub_network:
driver: overlay
configs:
nginx:
file: configs/nginx/nginx.conf
nginx_log:
file: configs/nginx/nginx_log.conf
postgres:
file: configs/postgres/postgresql.conf