Merge feature/manual-docker-publish into develop

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 00:00:08 +02:00
5 changed files with 68 additions and 6 deletions

View File

@ -7,6 +7,7 @@
.env*
node_modules
data
user_data
transcode-cache
coverage
dist

View File

@ -5,7 +5,7 @@
# - NVIDIA NVENC: Requires nvidia-container-toolkit on host + --gpus flag
# - Intel QSV: Mount /dev/dri
#
# Build: docker compose build
# Build and publish manually: ./build-push.sh [TAG]
# Run with VAAPI: docker run --device /dev/dri:/dev/dri --group-add video ...
FROM ubuntu:24.04

View File

@ -66,14 +66,36 @@ nodecast-tv is a modern, web-based IPTV player featuring Live TV, EPG, Movies (V
You can run nodecast-tv easily using Docker.
Container images are published to `ghcr.io/technomancer702/nodecast-tv` when a GitHub release is published. Use a version tag such as `v2.2.1` for the release: stable releases publish image tags `2.2.1`, `2.2`, and `latest`; prereleases publish their full version tag without updating `latest` or the minor-version alias. Branch pushes, tag pushes alone, and draft releases do not publish images.
This fork uses `gitea.anthonybouteiller.ovh/blomios/nodecast-tv:latest`. Images are built and published manually from the local checkout; Compose pulls the published image and does not build from GitHub.
Before publishing, log in interactively (enter your password or personal access token at the prompt; do not put credentials in this repository):
```bash
docker login gitea.anthonybouteiller.ovh --username blomios
./build-push.sh # Build this checkout and push :latest
./build-push.sh v2.2.7-local # Build and push only this tag
```
The script can be invoked by absolute path from any working directory. It requires Docker and a running Docker daemon, stops if the build fails, and performs a real push when invoked. It uses local files, including uncommitted application changes. `.dockerignore` excludes runtime data, caches, local environment files and credentials. Keep any other secrets outside the build context. Builds target the builder's platform; they do not publish a multi-platform manifest. Publishing a version tag does not also update `latest`.
Gitea's package registry must be enabled and reachable through the reverse proxy at `/v2/`. Your account must be allowed to publish packages under `blomios`. With 2FA/OAuth, use a personal access token with package read/write permissions; private image pulls also require login with package read access. Authentication, package activation and remote push have not been verified by adding this script. See the [Gitea container registry documentation](https://docs.gitea.com/usage/packages/container/).
To use another image repository or deployment tag, set `NODECAST_IMAGE` (registry/path without a tag) and `NODECAST_TAG`. Both the script and Compose support these variables; the script's positional tag takes precedence. Export them in your shell for both commands (the script does not load `.env`):
```bash
export NODECAST_IMAGE=gitea.anthonybouteiller.ovh/blomios/nodecast-tv
export NODECAST_TAG=v2.2.7-local
./build-push.sh
docker compose pull
docker compose up -d
```
1. Create a `docker-compose.yml` file (or copy the one from this repo):
```yaml
services:
nodecast-tv:
build: https://github.com/technomancer702/nodecast-tv.git#main
image: ${NODECAST_IMAGE:-gitea.anthonybouteiller.ovh/blomios/nodecast-tv}:${NODECAST_TAG:-latest}
container_name: nodecast-tv
ports:
- "3000:3000" # Host:Container
@ -87,7 +109,8 @@ Container images are published to `ghcr.io/technomancer702/nodecast-tv` when a G
2. Run the container:
```bash
docker-compose up -d
docker compose pull
docker compose up -d
```
The application will be available at `http://localhost:3000`.

39
build-push.sh Executable file
View File

@ -0,0 +1,39 @@
#!/usr/bin/env bash
set -euo pipefail
usage() {
printf '%s\n' 'Usage: build-push.sh [TAG]' \
'Build this checkout and push it to the Gitea container registry.' \
'TAG defaults to NODECAST_TAG or latest; NODECAST_IMAGE overrides the image repository.'
}
if [[ $# -eq 1 && ( $1 == --help || $1 == -h ) ]]; then
usage
exit 0
fi
if [[ $# -gt 1 ]]; then
usage >&2
exit 1
fi
repo_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
image="${NODECAST_IMAGE:-gitea.anthonybouteiller.ovh/blomios/nodecast-tv}"
tag="${1-${NODECAST_TAG:-latest}}"
if [[ ! $tag =~ ^[a-zA-Z0-9_][a-zA-Z0-9_.-]{0,127}$ ]]; then
printf '%s\n' 'Error: Invalid Docker tag (1–128 letters, digits, underscores, dots or hyphens; cannot start with dot/hyphen).' >&2
exit 1
fi
if [[ $image != */* || $image == *://* || $image == *@* || $image =~ [[:space:]] || ${image##*/} == *:* ]]; then
printf '%s\n' 'Error: NODECAST_IMAGE must be a registry/repository path without a tag or digest.' >&2
exit 1
fi
if ! command -v docker >/dev/null 2>&1; then
printf '%s\n' 'Error: Docker is required to build and push the image.' >&2
exit 1
fi
reference="${image}:${tag}"
printf 'Building %s from %s\n' "$reference" "$repo_dir"
docker build --file "$repo_dir/Dockerfile" --tag "$reference" "$repo_dir"
printf 'Pushing %s\n' "$reference"
docker push "$reference"

View File

@ -1,7 +1,6 @@
services:
nodecast-tv:
image: ghcr.io/technomancer702/nodecast-tv:latest
build: https://github.com/technomancer702/nodecast-tv.git#main
image: ${NODECAST_IMAGE:-gitea.anthonybouteiller.ovh/blomios/nodecast-tv}:${NODECAST_TAG:-latest}
container_name: nodecast-tv
ports:
- "3000:3000"