-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (56 loc) · 1.65 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
version: "3.2"
services:
traefik:
image: "traefik:v2.5"
container_name: traefik
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.api.address=:8082"
- "--entrypoints.notebook.address=:8888"
- "--entrypoints.dash.address=:8050"
ports:
- "8082:8082" # api
- "8888:8888" # notebook
- "8050:8050" # dash
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- cataclop_internal
app:
container_name: cataclop_app
build: .
command: "supervisord -n -c /etc/supervisor/supervisord.conf"
volumes:
- .env:/app/.env
- ./var:/app/var
- ./notebooks:/app/notebooks
networks:
- cataclop_internal
depends_on:
- db
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=Host(`${HOST}`)"
- "traefik.http.routers.app.entrypoints=api,dash"
- "traefik.http.routers.app.service=app"
- "traefik.http.services.app.loadbalancer.server.port=8082"
- "traefik.http.routers.notebook.rule=Host(`${HOST}`)"
- "traefik.http.routers.notebook.entrypoints=notebook"
- "traefik.http.routers.notebook.service=notebook"
- "traefik.http.services.notebook.loadbalancer.server.port=8888"
db:
container_name: cataclop_db
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: pass1234
MYSQL_USER: cataclop
MYSQL_PASSWORD: cataclop
volumes:
- ./var/mysql:/var/lib/mysql:rw
- ./docker/initdb:/docker-entrypoint-initdb.d:ro
networks:
- cataclop_internal
networks:
cataclop_internal:
driver: bridge