Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
737fcaf
Merge pull request #2 from thehack904/dev
thehack904 Oct 7, 2025
2e256c8
Merge branch 'dev'
thehack904 Oct 7, 2025
104debb
Update README.md
thehack904 Oct 7, 2025
063dcf1
Merge pull request #4 from thehack904/thehack904-patch-1
thehack904 Oct 7, 2025
a9e739d
Update INSTALL.md
thehack904 Oct 8, 2025
66e0ffe
Merge pull request #5 from thehack904/thehack904-patch-2
thehack904 Oct 8, 2025
f77f7b5
Merge pull request #6 from thehack904/main
thehack904 Oct 9, 2025
bd92e53
Create retroiptv_rpi.sh
thehack904 Oct 9, 2025
f77791a
Update retroiptv_rpi.sh
thehack904 Oct 9, 2025
76be2a4
Update retroiptv_rpi.sh
thehack904 Oct 9, 2025
4e6f600
Update ROADMAP.md
thehack904 Oct 9, 2025
8ff431a
Update ROADMAP.md
thehack904 Oct 9, 2025
e9e0400
Update retroiptv_rpi.sh
thehack904 Oct 9, 2025
2e99b91
Update retroiptv_rpi.sh
thehack904 Oct 9, 2025
26d4dac
Update retroiptv_rpi.sh
thehack904 Oct 9, 2025
999c8ef
Update retroiptv_rpi.sh
thehack904 Oct 9, 2025
b1718b3
Update retroiptv_rpi.sh
thehack904 Oct 10, 2025
a2b0b2f
Merge pull request #7 from thehack904/dev
thehack904 Oct 10, 2025
e191278
Merge pull request #8 from thehack904/main
thehack904 Oct 10, 2025
79ed758
Update install.sh
thehack904 Oct 10, 2025
c2db331
Update retroiptv_rpi.sh
thehack904 Oct 10, 2025
ba70c41
Update app.py
thehack904 Oct 10, 2025
de15bae
Update install_windows.ps1
thehack904 Oct 10, 2025
c77bcc3
Update uninstall.sh
thehack904 Oct 10, 2025
18bf4cd
Update uninstall_windows.ps1
thehack904 Oct 10, 2025
3d1c4a5
Update bump_version.py
thehack904 Oct 10, 2025
4444706
Merge pull request #9 from thehack904/dev
thehack904 Oct 10, 2025
1b946c5
Update CHANGELOG.md
thehack904 Oct 10, 2025
19fe669
Document Updates for 3.1.0
thehack904 Oct 10, 2025
a719d7c
Merge branch 'dev' of https://github.com/thehack904/RetroIPTVGuide in…
thehack904 Oct 10, 2025
e35973e
Merge pull request #10 from thehack904/dev
thehack904 Oct 10, 2025
882ba18
Update INSTALL.md
thehack904 Oct 10, 2025
69e67ff
Merge pull request #11 from thehack904/thehack904-patch-1
thehack904 Oct 10, 2025
ee2c111
Update INSTALL.md
thehack904 Oct 10, 2025
29447fb
Merge pull request #13 from thehack904/thehack904-patch-1
thehack904 Oct 10, 2025
c59b3d4
Update INSTALL.md
thehack904 Oct 11, 2025
d05f1c7
Merge pull request #14 from thehack904/thehack904-patch-1
thehack904 Oct 11, 2025
413521b
Create docker-publish.yml
thehack904 Oct 11, 2025
b6c9d59
Merge pull request #15 from thehack904/thehack904-patch-1
thehack904 Oct 11, 2025
db4be3d
Update docker-publish.yml
thehack904 Oct 11, 2025
94ec909
Merge pull request #16 from thehack904/thehack904-patch-1
thehack904 Oct 11, 2025
2dddbe7
Create Dockerfile
thehack904 Oct 11, 2025
4c6d42f
Merge pull request #17 from thehack904/thehack904-patch-1
thehack904 Oct 11, 2025
f798465
Update docker-publish.yml
thehack904 Oct 11, 2025
d61e160
Merge pull request #18 from thehack904/thehack904-patch-1
thehack904 Oct 11, 2025
1e5e277
Version 3.2.0 Updates
thehack904 Oct 11, 2025
5fb5f35
Merge pull request #19 from thehack904/thehack904-patch-1
thehack904 Oct 11, 2025
fb8da59
Add Docker deployment bundle and updated README badges
thehack904 Oct 11, 2025
c88af57
Merge pull request #21 from thehack904/docker-updates-v3.2.0
thehack904 Oct 11, 2025
20355d1
Update app.py
thehack904 Oct 11, 2025
9ead723
Merge pull request #22 from thehack904/thehack904-patch-1
thehack904 Oct 11, 2025
47c9711
Add automated GHCR cleanup (keep 5 latest builds)
thehack904 Oct 11, 2025
dec1d3c
Merge pull request #23 from thehack904/thehack904-patch-1
thehack904 Oct 11, 2025
f65af97
Update INSTALL.md
thehack904 Oct 11, 2025
ba04bbd
Merge pull request #24 from thehack904/thehack904-patch-1
thehack904 Oct 11, 2025
64030ec
Update docker-publish.yml
thehack904 Oct 11, 2025
fd98bf9
Merge pull request #25 from thehack904/thehack904-patch-1
thehack904 Oct 11, 2025
9353e06
Update README.md
thehack904 Oct 11, 2025
329abf6
Merge pull request #26 from thehack904/thehack904-patch-1
thehack904 Oct 11, 2025
9ec094b
Update docker-publish.yml
thehack904 Oct 11, 2025
fca6c50
Merge pull request #27 from thehack904/thehack904-patch-1
thehack904 Oct 11, 2025
8d98e8e
Update docker-publish.yml
thehack904 Oct 12, 2025
f7a45a9
Merge pull request #28 from thehack904/thehack904-patch-1
thehack904 Oct 12, 2025
40fad08
Update docker-publish.yml
thehack904 Oct 12, 2025
a6bdb9f
Merge pull request #29 from thehack904/thehack904-patch-1
thehack904 Oct 12, 2025
12482bc
Update docker-publish.yml
thehack904 Oct 12, 2025
c2a5f23
Merge pull request #30 from thehack904/thehack904-patch-1
thehack904 Oct 12, 2025
87490d1
Update docker-publish.yml
thehack904 Oct 12, 2025
22b59ae
Merge pull request #31 from thehack904/thehack904-patch-1
thehack904 Oct 12, 2025
472b933
Update docker-publish.yml
thehack904 Oct 12, 2025
a11b538
Merge pull request #32 from thehack904/thehack904-patch-1
thehack904 Oct 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
167 changes: 167 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
name: 🚀 Build and Publish RetroIPTVGuide to GHCR and Docker Hub

on:
push:
branches: [ main ]
tags:
- 'v*'
workflow_dispatch:
schedule:
- cron: '0 3 * * 0' # weekly cleanup on Sundays 03:00 UTC

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write

steps:
- name: 🧾 Checkout repository
uses: actions/checkout@v4

- name: 🔡 Normalize image name to lowercase
id: prep
run: |
IMAGE_NAME_LOWER=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
echo "IMAGE_NAME_LOWER=${IMAGE_NAME_LOWER}" >> $GITHUB_ENV

- name: 🏗️ Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# ---------- GHCR ----------
- name: 🔑 Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PAT }}

- name: 🧱 Build and Push multi-arch image to GHCR
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LOWER }}:${{ github.ref_name }}
labels: |
org.opencontainers.image.source=${{ github.repositoryUrl }}
org.opencontainers.image.description=RetroIPTVGuide Flask + SQLite Web App
org.opencontainers.image.licenses=CC-BY-NC-SA-4.0

- name: 🧹 Cleanup local images
run: docker image prune -af || true

# ---------- Docker Hub ----------
- name: 🐳 Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: 🧱 Build and Push single-arch image to Docker Hub
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64
provenance: false
tags: |
thehack904/retroiptvguide:latest
thehack904/retroiptvguide:${{ github.ref_name }}
labels: |
org.opencontainers.image.source=${{ github.repositoryUrl }}
org.opencontainers.image.description=RetroIPTVGuide Flask + SQLite Web App
org.opencontainers.image.licenses=CC-BY-NC-SA-4.0

# ---------- Summary ----------
- name: 🧾 Post-build summary
run: |
echo ""
echo "✅ GHCR and Docker Hub builds complete."
echo "🧩 Published image tags:"
echo " ghcr.io/thehack904/retroiptvguide:latest"
echo " ghcr.io/thehack904/retroiptvguide:${{ github.ref_name }}"
echo " thehack904/retroiptvguide:latest"
echo " thehack904/retroiptvguide:${{ github.ref_name }}"
echo ""
echo "🔗 Docker Hub: https://hub.docker.com/r/thehack904/retroiptvguide/tags"
echo "🔗 GHCR: https://github.com/thehack904?tab=packages&repo_name=RetroIPTVGuide"
echo ""

# ---------- GHCR Cleanup ----------
cleanup-ghcr:
name: 🧽 Cleanup old GHCR images
runs-on: ubuntu-latest
needs: build-and-push
permissions:
packages: write
steps:
- name: 🧹 Delete old GHCR package versions (keep 5)
uses: actions/delete-package-versions@v5
with:
owner: thehack904
package-name: retroiptvguide
package-type: container
min-versions-to-keep: 5
token: ${{ secrets.GHCR_PAT }}
continue-on-error: true

- name: 🧾 Summary
run: echo "✅ GHCR cleanup complete — kept 5 latest versions."

# ---------- Docker Hub Cleanup ----------
cleanup-dockerhub:
name: 🧽 Cleanup old Docker Hub tags
runs-on: ubuntu-latest
needs: build-and-push
env:
USER: thehack904
REPO: retroiptvguide
USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
steps:
- name: 🧹 Remove old Docker Hub tags (keep 5)
run: |
echo "🔑 Authenticating with Docker Hub API..."
AUTH_RESP=$(curl -s -X POST \
-H "Content-Type: application/json" \
-d "{\"username\": \"${USERNAME}\", \"password\": \"${TOKEN}\"}" \
https://hub.docker.com/v2/users/login/)
JWT=$(echo $AUTH_RESP | jq -r .token)

if [ -z "$JWT" ] || [ "$JWT" = "null" ]; then
echo "❌ Authentication failed — could not get JWT token."
exit 1
fi

echo "✅ Authenticated successfully."

TAGS=$(curl -s -H "Authorization: JWT ${JWT}" \
"https://hub.docker.com/v2/repositories/${USER}/${REPO}/tags/?page_size=100" |
jq -r '.results[].name')

if [ -z "$TAGS" ]; then
echo "⚠️ No tags found — skipping cleanup."
exit 0
fi

COUNT=0
for TAG in $TAGS; do
COUNT=$((COUNT+1))
if [ $COUNT -gt 5 ]; then
echo "🧹 Deleting $TAG ..."
curl -s -X DELETE -H "Authorization: JWT ${JWT}" \
"https://hub.docker.com/v2/repositories/${USER}/${REPO}/tags/${TAG}/" >/dev/null
fi
done

echo "✅ Docker Hub cleanup complete — kept 5 newest tags."

47 changes: 46 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# đź“‘ Changelog
## Changelog

All notable changes to this project will be documented here.
Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
Expand All @@ -14,6 +14,51 @@ This project follows [Semantic Versioning](https://semver.org/).

---

## [v3.2.0] - 2025-10-11
### Added
- **Containerization & TrueNAS Deployment Support**
- Added official Dockerfile and `docker-compose.yml` for cross‑platform container deployments.
- Added **TrueNAS SCALE App chart** with persistent volume mapping (`/config`, `/logs`, `/data`).
- Added GitHub Actions workflow for automatic GHCR image builds.
- Docker image published at:
`ghcr.io/thehack904/retroiptvguide:latest`
- Integrated automatic build‑and‑push pipeline using GitHub Actions and GHCR_PAT authentication.
- Added healthcheck and restart policies in Docker configuration.

### Changed
- Documentation updated for container installation (Docker/TrueNAS) as the new primary method.
- Legacy Python and system installers moved to “manual install” section.

### Fixed
- Corrected GHCR tag formatting for TrueNAS (eliminated `:latest:latest` errors).
- Fixed workflow permissions with explicit `packages: write` and PAT authentication.
---

## v3.1.0 - 2025-10-09
### Added
- New **RetroIPTVGuide Raspberry Pi headless installer** (`retroiptv_rpi.sh`)
- Detects Raspberry Pi 3 / 4 / 5 models and auto-configures GPU memory
- Creates dedicated `iptv` user and installs to `/home/iptv/iptv-server`
- Logs all activity to `/var/log/retroiptvguide/install-YYYYMMDD-HHMMSS.log`
- Adds `--yes` and `--agree` flags for fully unattended installs
- Includes automatic environment checks for SD card size, RAM, and swap

### Changed
- **Installer alignment:**
- Raspberry Pi installer now mirrors Debian / Windows structure
- Replaced all `apt` usage with `apt-get` for stable scripting
- Added verified, silenced `set_gpu_mem()` function that suppresses `rfkill` Wi-Fi warnings
- Enhanced post-install verification loop (up to 15 s) to confirm Flask web service readiness
- **bump_version.py:** now updates both `install.sh` and `retroiptv_rpi.sh` versions automatically
- Unified version tagging across all installers (`VERSION="x.y.z"` format)

### Fixed
- Eliminated false-positive Wi-Fi “blocked by rfkill” messages during GPU configuration
- Corrected early-trigger HTTP service check timing on slower Pi 3/4 boards
- Ensured consistent permissions and ownership under `/home/iptv`

---

## [v3.0.1] - 2025-10-07
### Added
- **EPG Fallback System**
Expand Down
57 changes: 57 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# ============================================
# RetroIPTVGuide - Dockerfile
# ============================================
FROM python:3.12-slim

LABEL maintainer="thehack904"
LABEL description="RetroIPTVGuide Flask + SQLite Web App"
LABEL version="3.1.0"

# --------------------------------------------
# Environment setup
# --------------------------------------------
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
APP_HOME=/app

WORKDIR $APP_HOME

# --------------------------------------------
# Install minimal system dependencies
# --------------------------------------------
RUN apt-get update && apt-get install -y --no-install-recommends \
tini \
curl \
&& rm -rf /var/lib/apt/lists/*

# --------------------------------------------
# Copy and install Python dependencies
# --------------------------------------------
COPY requirements.txt ./
RUN pip install --upgrade pip && pip install -r requirements.txt

# --------------------------------------------
# Copy application code
# --------------------------------------------
COPY . .

# --------------------------------------------
# Create persistent directories for TrueNAS mounts
# --------------------------------------------
RUN mkdir -p /app/config /app/logs /app/data

# --------------------------------------------
# Expose Flask port
# --------------------------------------------
EXPOSE 5000

# --------------------------------------------
# Use tini as init for graceful shutdown handling
# --------------------------------------------
ENTRYPOINT ["/usr/bin/tini", "--"]

# --------------------------------------------
# Start the Flask app
# (Change app.py to wsgi.py if you ever switch to gunicorn)
# --------------------------------------------
CMD ["python", "app.py"]
Loading