-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
146 lines (138 loc) · 5.15 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
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
version: '3.8'
services:
traefik:
image: traefik:v2.10
container_name: traefik
command:
- "--api.insecure=true" # Enable dashboard - don't use in production
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--log.level=DEBUG"
ports:
- "80:80" # The HTTP port
- "8090:8080" # The Web UI port
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- videowise-network
videowise-db:
image: postgres:14
container_name: videowise-db
environment:
POSTGRES_USER: "${POSTGRES_USERNAME}"
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
POSTGRES_DB: "${POSTGRES_DB_NAME}"
volumes:
- db_data:/var/lib/postgresql/data # Mount a volume for persistent DB storage
- ./videowise-db-data/V1.0.0_initial_schema.sql:/docker-entrypoint-initdb.d/V1.0.0_initial_schema.sql # Mount the SQL schema
networks:
- videowise-network
videowise-ui-client:
image: nginx:alpine
container_name: videowise-ui-client
build:
context: ./videowise-ui-client
dockerfile: Dockerfile
environment:
MAIN_SERVICE_URL: "/mainservice/api" # Service name used as DNS
volumes:
- ./videowise-ui-client:/usr/share/nginx/html
networks:
- videowise-network
labels:
- "traefik.enable=true"
- "traefik.http.routers.ui.rule=PathPrefix(`/`)"
- "traefik.http.routers.ui.entrypoints=web"
- "traefik.http.services.ui.loadbalancer.server.port=80"
- "traefik.http.middlewares.ui-strip.stripprefix.prefixes=/"
- "traefik.http.routers.ui.middlewares=ui-strip"
- "traefik.http.routers.ui.priority=1"
videowise-main-service:
build:
context: ./videowise-main-service
dockerfile: Dockerfile
container_name: videowise-main-service
depends_on:
- videowise-db
environment:
# MANDATORY
QUARKUS_DATASOURCE_JDBC_URL: "jdbc:postgresql://videowise-db:5432/videowise_db" # DB connection URL
OLLAMA_API_URL: "${OLLAMA_API_URL}" # Complete URL to Ollama /api/chat
FILESYSTEM_API_URL: "http://videowise-filesystem-service:8081" # Remote Filesystem
FILESYSTEM_STREAMING_API_URL: "/fsservice" # Remote Filesystem via reverse proxy
WHISPER_API_URL: "http://videowise-python-service:8000" # Python Server
# OPTIONAL
WHISPER_MODEL: ${WHISPER_MODEL} # Whisper transcription model
OLLAMA_MODEL: ${OLLAMA_MODEL} # Ollama chat model
OLLAMA_CTX_LEN: ${OLLAMA_CTX_LEN} # Ollama model context length
OLLAMA_MAX_PRED_LEN: ${OLLAMA_MAX_PRED_LEN} # Ollama model max response length
networks:
- videowise-network
ports:
- "8081:8080"
labels:
- "traefik.enable=true"
- "traefik.http.routers.main.rule=PathPrefix(`/mainservice`)"
- "traefik.http.routers.main.entrypoints=web"
- "traefik.http.services.main.loadbalancer.server.port=8080"
- "traefik.http.middlewares.main-strip.stripprefix.prefixes=/mainservice"
- "traefik.http.routers.main.middlewares=main-strip"
- "traefik.http.routers.main.priority=10"
videowise-python-service:
build:
context: ./videowise-python-service
dockerfile: Dockerfile
container_name: videowise-python-service
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
environment:
FILESYSTEM_API_URL: "http://videowise-filesystem-service:8081"
WHISPER_MODEL: ${WHISPER_MODEL} # Whisper transcription model
networks:
- videowise-network
ports:
- "9000:8000"
labels:
- "traefik.enable=true"
- "traefik.http.routers.python.rule=PathPrefix(`/pythonservice`)"
- "traefik.http.routers.python.entrypoints=web"
- "traefik.http.services.python.loadbalancer.server.port=8000"
- "traefik.http.middlewares.python-strip.stripprefix.prefixes=/pythonservice"
- "traefik.http.routers.python.middlewares=python-strip"
- "traefik.http.routers.python.priority=5"
videowise-filesystem-service:
build:
context: ./videowise-filesystem-service
dockerfile: Dockerfile
container_name: videowise-filesystem-service
volumes:
- ./videowise-filesystem-service/uploads:/app/uploads
networks:
- videowise-network
ports:
- "9001:8081"
labels:
- "traefik.enable=true"
# Add fsservice and stream paths
- "traefik.http.routers.fs.rule=PathPrefix(`/fsservice`) || PathPrefix(`/stream`)"
- "traefik.http.routers.fs.entrypoints=web"
- "traefik.http.services.fs.loadbalancer.server.port=8081"
- "traefik.http.middlewares.fs-strip.stripprefix.prefixes=/fsservice,/stream"
- "traefik.http.routers.fs.middlewares=fs-strip"
- "traefik.http.routers.fs.priority=10"
networks:
videowise-network:
driver: bridge
volumes:
db_data:
driver: local
driver_opts:
type: none
device: ./videowise-db/db_data
o: bind