mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
131 lines
2.7 KiB
YAML
131 lines
2.7 KiB
YAML
version: "3.8"
|
|
|
|
x-transcoder: &transcoder-base
|
|
build: ./transcoder
|
|
networks:
|
|
default:
|
|
aliases:
|
|
- transcoder
|
|
restart: on-failure
|
|
env_file:
|
|
- ./.env
|
|
volumes:
|
|
- ${LIBRARY_ROOT}:/video:ro
|
|
- ${CACHE_ROOT}:/cache
|
|
- metadata:/metadata
|
|
|
|
services:
|
|
back:
|
|
build: ./back
|
|
restart: on-failure
|
|
env_file:
|
|
- ./.env
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
meilisearch:
|
|
condition: service_healthy
|
|
volumes:
|
|
- kyoo:/kyoo
|
|
|
|
front:
|
|
build: ./front
|
|
restart: on-failure
|
|
environment:
|
|
- KYOO_URL=${KYOO_URL:-http://back:5000}
|
|
|
|
scanner:
|
|
build: ./scanner
|
|
restart: on-failure
|
|
depends_on:
|
|
back:
|
|
condition: service_healthy
|
|
env_file:
|
|
- ./.env
|
|
environment:
|
|
- KYOO_URL=${KYOO_URL:-http://back:5000}
|
|
volumes:
|
|
- ${LIBRARY_ROOT}:/video:ro
|
|
|
|
transcoder:
|
|
<<: *transcoder-base
|
|
profiles: ['']
|
|
|
|
transcoder-nvidia:
|
|
<<: *transcoder-base
|
|
deploy:
|
|
resources:
|
|
reservations:
|
|
devices:
|
|
- capabilities: [gpu]
|
|
environment:
|
|
- GOCODER_HWACCEL=nvidia
|
|
profiles: ['nvidia']
|
|
|
|
transcoder-vaapi:
|
|
<<: *transcoder-base
|
|
devices:
|
|
- /dev/dri:/dev/dri
|
|
environment:
|
|
- 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_HWACCEL=qsv
|
|
- GOCODER_VAAPI_RENDERER=${GOCODER_VAAPI_RENDERER:-/dev/dri/renderD128}
|
|
profiles: ['qsv']
|
|
|
|
ingress:
|
|
image: nginx
|
|
restart: on-failure
|
|
environment:
|
|
- PORT=8901
|
|
- FRONT_URL=http://front:8901
|
|
- BACK_URL=${KYOO_URL:-http://back:5000}
|
|
volumes:
|
|
- ./nginx.conf.template:/etc/nginx/templates/kyoo.conf.template:ro
|
|
depends_on:
|
|
- back
|
|
- front
|
|
ports:
|
|
- "8901:8901"
|
|
|
|
postgres:
|
|
image: postgres:15
|
|
restart: on-failure
|
|
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: on-failure
|
|
volumes:
|
|
- search:/meili_data
|
|
environment:
|
|
- MEILI_ENV=production
|
|
env_file:
|
|
- .env
|
|
healthcheck:
|
|
test: ["CMD", "wget", "--no-verbose", "--spider", "http://localhost:7700/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
kyoo:
|
|
db:
|
|
metadata:
|
|
search:
|