feat(deploy): make compose standalone with optional Laya (#30)

Use configurable published images in docker-compose and update deployment docs so Compose works without a full checkout or local Dockerfiles.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
blomios
2026-10-06 21:07:50 +02:00
parent 1791b77a68
commit 7fd2bea665
2 changed files with 29 additions and 21 deletions

View File

@ -64,17 +64,17 @@ nodecast-tv is a modern, web-based IPTV player featuring Live TV, EPG, Movies (V
### Docker Deployment
The repository includes a ready-to-use `docker-compose.yml`. Run these commands from the repository directory so Compose uses that file and the local Dockerfiles.
The provided `docker-compose.yml` is standalone: copy that file to an empty deployment directory and run Compose there. You do not need to clone the repository or keep any Dockerfile for a normal deployment. Application data is stored in the `./data` directory next to the Compose file.
#### Standard deployment
Start nodecast-tv without the optional Laya runtime:
```bash
docker compose up -d --build nodecast-tv
docker compose up -d
```
The application will be available at `http://localhost:3000`. Live channel analysis continues to work in **Standard** mode when Laya is not running.
Compose pulls `${NODECAST_IMAGE}` when set, or `gitea.anthonybouteiller.ovh/blomios/nodecast-tv:latest` by default. The application will be available at `http://localhost:3000`. Live channel analysis continues to work in **Standard** mode when Laya is not running.
#### Optional Laya runtime
@ -83,22 +83,31 @@ Laya provides optional local-AI assistance for channel grouping and language det
Start nodecast-tv and Laya together:
```bash
docker compose --profile laya up -d --build
docker compose --profile laya up -d
```
Rebuild and recreate both services after an update:
Pull newer images and recreate both services after an update:
```bash
docker compose --profile laya up -d --build --force-recreate
docker compose --profile laya pull
docker compose --profile laya up -d --force-recreate
```
Rebuild and recreate only Laya:
Recreate only Laya:
```bash
docker compose --profile laya up -d --build --force-recreate laya
docker compose --profile laya pull laya
docker compose --profile laya up -d --force-recreate laya
```
The Laya model cache is persisted under `./data/models/laya`. The first analysis can take longer while the runtime downloads or loads its model.
The optional service uses `${LAYA_IMAGE}` when set, or the project image `gitea.anthonybouteiller.ovh/blomios/nodecast-tv-laya:latest` by default. That image must be published and accessible in your environment. If it is hosted under another registry or tag, create a `.env` file next to `docker-compose.yml`:
```env
NODECAST_IMAGE=gitea.anthonybouteiller.ovh/blomios/nodecast-tv:latest
LAYA_IMAGE=registry.example.com/team/nodecast-tv-laya:latest
```
No third-party Laya image is selected implicitly. If no suitable Laya image is available, omit the `laya` profile and continue using Standard mode. The Laya model cache is persisted under `./data/models/laya`; its first analysis can take longer while the runtime downloads or loads the model.
Inside Compose, nodecast-tv reaches Laya at `http://laya:8000`. When running nodecast-tv directly on the host with a separately exposed Laya runtime, use:
@ -108,7 +117,7 @@ LAYA_BASE_URL=http://localhost:8000 npm start
`http://laya:8000` is a Compose-internal hostname and does not resolve from a host process.
To publish the image, log in if needed with `docker login gitea.anthonybouteiller.ovh`, then run `./scripts/docker-build-push.sh`. Use `--no-push` to build it locally without publishing.
Repository maintainers can still build and publish the nodecast-tv image with `./scripts/docker-build-push.sh`; this script is not needed by Compose users.
### Hardware Acceleration Setup
@ -243,7 +252,9 @@ docker compose config --profiles
The standard configuration should list `nodecast-tv`; with the `laya` profile enabled it should list both `nodecast-tv` and `laya`. The available profiles should include `laya`.
If `docker compose ... laya` reports `no such service: laya`, you are usually using an old or different Compose file, or running the command from the wrong directory. Update the checkout, change to the directory containing this repository's `docker-compose.yml`, and run `docker compose config --services` again.
If `docker compose ... laya` reports `no such service: laya`, you are usually using an old or different Compose file, or running the command from the wrong directory. Replace it with the current standalone `docker-compose.yml`, change to the directory containing that file, and run `docker compose config --services` again.
If Compose cannot pull the Laya image, verify that `LAYA_IMAGE` names a published image and authenticate to its registry if necessary. This does not prevent the standard nodecast-tv service from running without the `laya` profile.
If Settings reports **“The optional Laya runtime is unavailable”**, nodecast-tv remains usable and falls back to Standard analysis. To diagnose Laya, run:
@ -254,16 +265,18 @@ docker compose --profile laya logs laya
docker compose --profile laya config
```
After configuration or image changes, perform a clean recreation:
After configuration or image changes, pull and perform a clean recreation:
```bash
docker compose --profile laya up -d --build --force-recreate
docker compose --profile laya pull
docker compose --profile laya up -d --force-recreate
```
To recreate only the optional runtime:
```bash
docker compose --profile laya up -d --build --force-recreate laya
docker compose --profile laya pull laya
docker compose --profile laya up -d --force-recreate laya
```
### Video Won't Play (Black Screen or Loading Forever)

View File

@ -1,9 +1,6 @@
services:
nodecast-tv:
build:
context: .
dockerfile: Dockerfile
image: gitea.anthonybouteiller.ovh/blomios/nodecast-tv:latest
image: ${NODECAST_IMAGE:-gitea.anthonybouteiller.ovh/blomios/nodecast-tv:latest}
container_name: nodecast-tv
ports:
- "3000:3000"
@ -20,9 +17,7 @@ services:
laya:
profiles: ["laya"]
build:
context: .
dockerfile: Dockerfile.laya
image: ${LAYA_IMAGE:-gitea.anthonybouteiller.ovh/blomios/nodecast-tv-laya:latest}
volumes:
- ./data/models/laya:/models
environment: