forked from zoriya/Kyoo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
191 lines (177 loc) · 4.37 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
x-transcoder: &transcoder-base
image: ghcr.io/zoriya/kyoo_transcoder:edge
networks:
default:
aliases:
- transcoder
restart: unless-stopped
env_file:
- ./.env
environment:
- GOCODER_PREFIX=/video
volumes:
- ${LIBRARY_ROOT}:/video:ro
- ${CACHE_ROOT}:/cache
- metadata:/metadata
services:
back:
image: ghcr.io/zoriya/kyoo_back:edge
restart: unless-stopped
cpus: 1.5
environment:
- TRANSCODER_URL=${TRANSCODER_URL:-http://transcoder:7666/video}
- KYOO_PREFIX=/api
env_file:
- ./.env
depends_on:
postgres:
condition: service_healthy
meilisearch:
condition: service_healthy
rabbitmq:
condition: service_healthy
migrations:
condition: service_completed_successfully
volumes:
- kyoo:/metadata
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=PathPrefix(`/api/`)"
migrations:
image: ghcr.io/zoriya/kyoo_migrations:edge
restart: "no"
depends_on:
postgres:
condition: service_healthy
env_file:
- ./.env
front:
image: ghcr.io/zoriya/kyoo_front:edge
restart: unless-stopped
environment:
- KYOO_URL=${KYOO_URL:-http://back:5000/api}
labels:
- "traefik.enable=true"
- "traefik.http.routers.front.rule=PathPrefix(`/`)"
scanner:
image: ghcr.io/zoriya/kyoo_scanner:edge
restart: unless-stopped
depends_on:
back:
condition: service_healthy
env_file:
- ./.env
environment:
- KYOO_URL=${KYOO_URL:-http://back:5000/api}
volumes:
- ${LIBRARY_ROOT}:/video:ro
matcher:
image: ghcr.io/zoriya/kyoo_scanner:edge
command: matcher
restart: unless-stopped
depends_on:
back:
condition: service_healthy
env_file:
- ./.env
environment:
- KYOO_URL=${KYOO_URL:-http://back:5000/api}
autosync:
image: ghcr.io/zoriya/kyoo_autosync:edge
restart: unless-stopped
depends_on:
rabbitmq:
condition: service_healthy
env_file:
- ./.env
transcoder:
<<: *transcoder-base
profiles: ['', 'cpu']
transcoder-nvidia:
<<: *transcoder-base
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]
driver: cdi
device_ids:
- nvidia.com/gpu=all
environment:
- GOCODER_PREFIX=/video
- GOCODER_HWACCEL=nvidia
profiles: ['nvidia']
transcoder-vaapi:
<<: *transcoder-base
devices:
- /dev/dri:/dev/dri
environment:
- GOCODER_PREFIX=/video
- GOCODER_HWACCEL=vaapi
- GOCODER_VAAPI_RENDERER=${GOCODER_VAAPI_RENDERER:-/dev/dri/renderD128}
profiles: ['vaapi']
# qsv is the same setup as vaapi but with the hwaccel env var different
transcoder-qsv:
<<: *transcoder-base
devices:
- /dev/dri:/dev/dri
environment:
- GOCODER_PREFIX=/video
- GOCODER_HWACCEL=qsv
- GOCODER_VAAPI_RENDERER=${GOCODER_VAAPI_RENDERER:-/dev/dri/renderD128}
profiles: ['qsv']
traefik:
image: traefik:v3.2
restart: unless-stopped
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entryPoints.web.address=:8901"
- "--accesslog=true"
ports:
- "8901:8901"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
postgres:
image: postgres:15
restart: unless-stopped
env_file:
- ./.env
volumes:
- db:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
meilisearch:
image: getmeili/meilisearch:v1.4
restart: unless-stopped
volumes:
- search:/meili_data
environment:
- MEILI_ENV=production
env_file:
- .env
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--spider", "http://meilisearch:7700/health"]
interval: 30s
timeout: 5s
retries: 5
rabbitmq:
image: rabbitmq:4-alpine
restart: unless-stopped
environment:
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 10s
retries: 5
start_period: 10s
volumes:
kyoo:
db:
metadata:
search: