-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
94 lines (86 loc) · 2.74 KB
/
docker-compose.dev.yml
File metadata and controls
94 lines (86 loc) · 2.74 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
version: "3.9"
services:
juypter:
build:
context: ./jupyter/
dockerfile: ./Dockerfile
depends_on:
- traefik
command: bash -c "
jupyter lite serve --port 8008
"
ports:
- "8008:8008"
labels:
- "traefik.enable=true"
- "traefik.http.routers.jupyter-insecure.rule=Host(`localhost`)"
- "traefik.http.routers.jupyter-insecure.entrypoints=web"
restart: on-failure
static-files:
# nginx config
image: nginx
volumes:
- ./static:/usr/share/nginx/html/static:ro
- ./default.conf:/etc/nginx/conf.d/default.conf
labels:
- "traefik.enable=true"
- "traefik.http.middlewares.static-files-insecure.compress=true"
- "traefik.http.routers.static-files-insecure.rule=Host(`localhost`) && PathPrefix(`/static`)"
- "traefik.http.routers.static-files-insecure.entrypoints=web"
depends_on:
- traefik
documentation:
build:
context: ./documentation/
dockerfile: ./Dockerfile_dev
command: bash -c "
gunicorn documentation.main:app -w 2 -b 0.0.0.0:8001 --reload --reload-extra-file /documentation/templates
"
ports:
- "8001:8001"
volumes:
- ./documentation:/documentation
depends_on:
- traefik
- static-files
labels:
- "traefik.enable=true"
- "traefik.http.routers.documentation-insecure.rule=Host(`localhost`) && PathPrefix(`/help`)"
- "traefik.http.routers.documentation-insecure.entrypoints=web"
- "traefik.http.middlewares.documentation-sp.stripprefix.prefixes=/help"
- "traefik.http.middlewares.documentation-sp.stripprefix.forceSlash=false"
- "traefik.http.routers.documentation-insecure.middlewares=documentation-sp"
restart: on-failure
api:
build:
context: ./api/
dockerfile: ./Dockerfile_dev
command: bash -c "
uvicorn api.main:app --host 0.0.0.0 --reload --root-path /api/v1
"
ports:
- "8000:8000"
volumes:
- ./api:/api
depends_on:
- traefik
labels:
- "traefik.enable=true"
- "traefik.http.routers.api-insecure.rule=Host(`localhost`) && PathPrefix(`/api/v1`)"
- "traefik.http.routers.api-insecure.entrypoints=web"
- "traefik.http.routers.api-insecure.middlewares=api-sp"
- "traefik.http.middlewares.api-sp.stripprefix.prefixes=/api/v1"
- "traefik.http.middlewares.api-sp.stripprefix.forceSlash=false"
restart: on-failure
traefik:
image: "traefik:v2.9"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"