mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-12-06 13:15:09 -05:00
add devspace (#1173)
This commit is contained in:
parent
e7d9002156
commit
2ef26e5d02
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
/video
|
/video
|
||||||
|
.devspace/
|
||||||
.env
|
.env
|
||||||
.venv
|
.venv
|
||||||
.idea
|
.idea
|
||||||
|
|||||||
23
api/devspace.yaml
Normal file
23
api/devspace.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
version: v2beta1
|
||||||
|
name: api
|
||||||
|
dev:
|
||||||
|
api:
|
||||||
|
imageSelector: ghcr.io/zoriya/kyoo_api
|
||||||
|
devImage: docker.io/oven/bun:latest
|
||||||
|
workingDir: /app
|
||||||
|
sync:
|
||||||
|
- path: .:/app
|
||||||
|
excludePaths:
|
||||||
|
- node_modules
|
||||||
|
startContainer: true
|
||||||
|
onUpload:
|
||||||
|
exec:
|
||||||
|
- command: bun install --frozen-lockfile
|
||||||
|
onChange:
|
||||||
|
- "./bun.lock"
|
||||||
|
command:
|
||||||
|
- bash
|
||||||
|
- -c
|
||||||
|
- "bun install && bun dev"
|
||||||
|
ports:
|
||||||
|
- port: "3567"
|
||||||
18
auth/devspace.yaml
Normal file
18
auth/devspace.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
version: v2beta1
|
||||||
|
name: auth
|
||||||
|
dev:
|
||||||
|
auth:
|
||||||
|
imageSelector: ghcr.io/zoriya/kyoo_auth
|
||||||
|
devImage: docker.io/golang:1.25
|
||||||
|
workingDir: /app
|
||||||
|
sync:
|
||||||
|
- path: .:/app
|
||||||
|
startContainer: true
|
||||||
|
onUpload:
|
||||||
|
restartContainer: true
|
||||||
|
command:
|
||||||
|
- bash
|
||||||
|
- -c
|
||||||
|
- "go mod download; go run -race ."
|
||||||
|
ports:
|
||||||
|
- port: "4568"
|
||||||
18
devspace.yaml
Normal file
18
devspace.yaml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
version: v2beta1
|
||||||
|
name: kyoo-devspace
|
||||||
|
dependencies:
|
||||||
|
api:
|
||||||
|
path: ./api
|
||||||
|
pipeline: dev
|
||||||
|
auth:
|
||||||
|
path: ./auth
|
||||||
|
pipeline: dev
|
||||||
|
front:
|
||||||
|
path: ./front
|
||||||
|
pipeline: dev
|
||||||
|
scanner:
|
||||||
|
path: ./scanner
|
||||||
|
pipeline: dev
|
||||||
|
transcoder:
|
||||||
|
path: ./transcoder
|
||||||
|
pipeline: dev
|
||||||
29
front/devspace.yaml
Normal file
29
front/devspace.yaml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
version: v2beta1
|
||||||
|
name: front
|
||||||
|
dev:
|
||||||
|
front:
|
||||||
|
imageSelector: ghcr.io/zoriya/kyoo_front
|
||||||
|
devImage: docker.io/oven/bun:latest
|
||||||
|
workingDir: /app
|
||||||
|
sync:
|
||||||
|
- path: .:/app
|
||||||
|
excludePaths:
|
||||||
|
- node_modules
|
||||||
|
startContainer: true
|
||||||
|
onUpload:
|
||||||
|
exec:
|
||||||
|
- command: bun install --frozen-lockfile
|
||||||
|
onChange:
|
||||||
|
- "./bun.lock"
|
||||||
|
# increased sysctl limits for file watching
|
||||||
|
# front uses Metro javascript bundler which watches a lot of files
|
||||||
|
# these are node level settings that should be raised
|
||||||
|
# example values:
|
||||||
|
# fs.inotify.max_user_instances = 8192
|
||||||
|
# fs.inotify.max_user_watches = 1048576
|
||||||
|
command:
|
||||||
|
- bash
|
||||||
|
- -c
|
||||||
|
- "bun install --frozen-lockfile; bun dev --port 8901"
|
||||||
|
ports:
|
||||||
|
- port: "8901"
|
||||||
25
scanner/devspace.yaml
Normal file
25
scanner/devspace.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
version: v2beta1
|
||||||
|
name: scanner
|
||||||
|
dev:
|
||||||
|
scanner:
|
||||||
|
imageSelector: ghcr.io/zoriya/kyoo_scanner
|
||||||
|
devImage: docker.io/astral/uv:python3.13-trixie
|
||||||
|
workingDir: /app
|
||||||
|
sync:
|
||||||
|
- path: .:/app
|
||||||
|
excludePaths:
|
||||||
|
- __pycache__
|
||||||
|
- .venv
|
||||||
|
startContainer: true
|
||||||
|
onUpload:
|
||||||
|
restartContainer: true
|
||||||
|
command:
|
||||||
|
- bash
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
echo "Running uv sync..."
|
||||||
|
uv sync --locked || (echo 'uv sync failed' && exit 1)
|
||||||
|
echo "Starting FastAPI..."
|
||||||
|
/app/.venv/bin/fastapi run scanner --port 4389
|
||||||
|
ports:
|
||||||
|
- port: "4389"
|
||||||
@ -10,6 +10,10 @@ pkgs.mkShell {
|
|||||||
(import ./transcoder/shell.nix {inherit pkgs;})
|
(import ./transcoder/shell.nix {inherit pkgs;})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
packages = [
|
||||||
|
pkgs.devspace
|
||||||
|
];
|
||||||
|
|
||||||
# env vars aren't inherited from the `inputsFrom`
|
# env vars aren't inherited from the `inputsFrom`
|
||||||
SHARP_FORCE_GLOBAL_LIBVIPS = 1;
|
SHARP_FORCE_GLOBAL_LIBVIPS = 1;
|
||||||
UV_PYTHON_PREFERENCE = "only-system";
|
UV_PYTHON_PREFERENCE = "only-system";
|
||||||
|
|||||||
41
transcoder/devspace.yaml
Normal file
41
transcoder/devspace.yaml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
version: v2beta1
|
||||||
|
name: transcoder
|
||||||
|
dev:
|
||||||
|
transcoder:
|
||||||
|
imageSelector: ghcr.io/zoriya/kyoo_transcoder
|
||||||
|
# would be good to publish the kyoo_transcoder builder image with all deps installed
|
||||||
|
devImage: golang:1.25
|
||||||
|
workingDir: /app
|
||||||
|
sync:
|
||||||
|
- path: .:/app
|
||||||
|
startContainer: true
|
||||||
|
onUpload:
|
||||||
|
restartContainer: true
|
||||||
|
command:
|
||||||
|
- bash
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
echo "Determining architecture..."
|
||||||
|
ARCH=$(dpkg --print-architecture)
|
||||||
|
echo "Container architecture: $ARCH"
|
||||||
|
echo "Updating apt and installing transcoder dependencies..."
|
||||||
|
apt-get update && \
|
||||||
|
apt-get install --no-install-recommends --no-install-suggests -y \
|
||||||
|
ffmpeg \
|
||||||
|
libavformat-dev libavutil-dev libswscale-dev \
|
||||||
|
vainfo mesa-va-drivers \
|
||||||
|
ca-certificates
|
||||||
|
if [ "$ARCH" = "amd64" ]; then
|
||||||
|
echo "Installing Intel VAAPI drivers (amd64 only)..."
|
||||||
|
apt-get install -y intel-media-va-driver-non-free i965-va-driver-shaders
|
||||||
|
else
|
||||||
|
echo "Skipping Intel VAAPI drivers for arch $ARCH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Downloading Go dependencies..."
|
||||||
|
go mod download
|
||||||
|
|
||||||
|
echo "Starting transcoder..."
|
||||||
|
go run -race .
|
||||||
|
ports:
|
||||||
|
- port: "7666"
|
||||||
Loading…
x
Reference in New Issue
Block a user