-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (78 loc) · 2.89 KB
/
docker-compose.yml
File metadata and controls
87 lines (78 loc) · 2.89 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
x-common-networks: &common-networks
networks:
- d-gui-network
x-common-extra-hosts: &extra-hosts
# use host.docker.internal to access the host machine from within the container
extra_hosts:
- "host.docker.internal:host-gateway"
services:
backend:
<<: [*common-networks, *extra-hosts]
build:
context: .
dockerfile: ./Dockerfile
image: d-gui-manager-web
container_name: d-gui-manager-web
entrypoint: /src/docker-entrypoint.sh
environment:
- DOCKER_NETWORK=d-gui-network
- DOCKER_IMAGE_NAME=gui-vnc
volumes:
- ./src:/src # backend source code for hot reloading
- ./supervisord.conf:/etc/supervisor/conf.d/supervisord.conf:rw # supervisord config
- /var/run/docker.sock:/var/run/docker.sock:rw # to access the host docker daemon
labels:
- "traefik.enable=true"
- "traefik.http.routers.backend-api.rule=PathPrefix(`/api`)"
- "traefik.http.routers.backend-api.service=backend-service"
- "traefik.http.routers.backend-api.priority=10"
- "traefik.http.routers.backend-dashboard-api.rule=PathPrefix(`/dashboard/api`)"
- "traefik.http.routers.backend-dashboard-api.service=backend-service"
- "traefik.http.routers.backend-dashboard-api.priority=10"
- "traefik.http.routers.backend-websocket.rule=PathPrefix(`/ws`)"
- "traefik.http.routers.backend-websocket.service=backend-service"
- "traefik.http.routers.backend-websocket.priority=10"
- "traefik.http.services.backend-service.loadbalancer.server.port=8000"
frontend:
<<: [*common-networks]
build:
context: ./frontend
dockerfile: Dockerfile
image: d-gui-manager-frontend
container_name: d-gui-manager-frontend
labels:
- "traefik.enable=true"
- "traefik.http.routers.frontend.rule=PathPrefix(`/`) && !PathRegexp(`^/novnc`)"
- "traefik.http.routers.frontend.service=frontend-service"
- "traefik.http.routers.frontend.priority=1"
- "traefik.http.services.frontend-service.loadbalancer.server.port=3000"
redis:
<<: [*common-networks]
image: redis:alpine
container_name: d-gui-manager-redis
nvidia-cuda:
# for testing with GPU support
image: nvidia/cuda:11.0.3-base-ubuntu20.04
container_name: d-gui-cuda
entrypoint: ["echo", "CUDA image ready"]
traefik:
<<: [*common-networks]
image: traefik:v3.0
container_name: d-gui-proxy
command:
- --providers.docker
- --providers.docker.exposedByDefault=false
- --providers.docker.network=d-gui-network
- --providers.docker.watch=true
- --entrypoints.web.address=:80
- --api.dashboard=true
- --api.insecure
- --serverstransport.insecureskipverify=true
ports:
- "8000:80" # Backend entrypoint
- "8080:8080" # Traefik Dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
d-gui-network:
external: true