feat(docker): add configurable Gitea image publishing (#52)

Build and push an image from the local checkout with configurable repository and tag; configure Compose to pull that image without an upstream build.

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

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`.