diff --git a/Dockerfile b/Dockerfile index cd4e55a..03ed358 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,8 @@ RUN uv sync --frozen --no-dev --no-cache # --------------------------------------------------------------------------- FROM python:3.13-slim-bookworm +LABEL org.opencontainers.image.source="https://git.lanro.eu/Roman/ohm_streaming" \ + org.opencontainers.image.description="Ohm Stream Downloader — outil technique d'automatisation, ne fournit ni n'héberge aucun contenu. L'usage relève de la seule responsabilité de l'utilisateur (droit d'auteur)." # ffmpeg (téléchargements HLS), ca-certificates (scraping HTTPS), # gosu (bascule utilisateur non-root dans l'entrypoint) RUN apt-get update \ diff --git a/README.md b/README.md index 35e90c2..03bc5a5 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,34 @@ Application web **auto-hébergée** (homelab) : centre de contrôle unique pour découvrir, regarder et télécharger des animes et séries VOSTFR/VF. +## ⚖️ Avertissement légal + +Ohm Stream Downloader est un **outil technique d'automatisation** : il ne +fournit, n'héberge ni ne distribue **aucun contenu**. Il automatise uniquement +l'accès à des flux déjà publiquement accessibles sur des sites tiers, dont +l'auteur n'est pas responsable et qu'il n'exploite pas. + +L'utilisation de ce logiciel relève de la **seule responsabilité de +l'utilisateur**, tenu de respecter la législation de son pays — notamment le +droit d'auteur (en France : art. L.122-4 du Code de la propriété +intellectuelle). Le téléchargement ou la diffusion d'œuvres protégées sans +autorisation est interdit par la loi. + +Projet publié à des fins **éducatives et de recherche**. L'auteur décline +toute responsabilité en cas d'usage illégal et n'encourage en aucune façon le +piratage. + +> **Disclaimer (EN)**: this project is a technical automation tool. It does +> not provide, host or distribute any content — it merely automates access to +> streams already publicly available on third-party websites that the author +> neither controls nor operates. Users are solely responsible for complying +> with their local laws, including copyright. The author assumes no liability +> for illegal use and does not endorse piracy. + ## Déploiement (Docker) — recommandé Le déploiement officiel passe par Docker Compose : l'image (ffmpeg inclus) est -hébergée sur le **registre du Gitea** — un compte y est requis, même en lecture. +hébergée publiquement sur **GHCR** (`ghcr.io/aulyriusohm/ohm-streaming`) — aucun compte requis. ### Installation guidée (recommandée) @@ -18,14 +42,13 @@ git clone https://git.lanro.eu/Roman/ohm_streaming.git && cd ohm_streaming Le script vérifie Docker, demande la **destination des épisodes** (dossier dédié recommandé — voir « Bibliothèque Plex/Sonarr » ci-dessous), le port, génère les secrets, branche le montage et démarre. Non interactif aussi : -`./scripts/install.sh --dir /srv/animes --port 8777 --skip-login`. +`./scripts/install.sh --dir /srv/animes --port 8777`. ### À la main ```bash -# 1. Récupérer le projet puis se connecter au registre privé (compte Gitea avec accès lecture) +# 1. Récupérer le projet git clone https://git.lanro.eu/Roman/ohm_streaming.git && cd ohm_streaming -docker login git.lanro.eu # 2. Configuration locale cp .env.example .env @@ -50,9 +73,8 @@ sudo loginctl enable-linger $USER # persister après déconnexion export PODMAN_SOCKET=/run/user/$(id -u)/podman/podman.sock # rootful : sudo systemctl enable --now podman.socket (aucun export nécessaire) -# 1. Récupérer le projet puis se connecter au registre (compte Gitea requis) +# 1. Récupérer le projet git clone https://git.lanro.eu/Roman/ohm_streaming.git && cd ohm_streaming -podman login git.lanro.eu # 2. Configuration locale (identique à Docker) cp .env.example .env # → OHM_SECRET_KEY et WATCHTOWER_TOKEN obligatoires diff --git a/docker-compose.podman.yml b/docker-compose.podman.yml index 17db086..a48037e 100644 --- a/docker-compose.podman.yml +++ b/docker-compose.podman.yml @@ -6,8 +6,7 @@ # export PODMAN_SOCKET=/run/user/$(id -u)/podman/podman.sock # rootful : sudo systemctl enable --now podman.socket # 2. cp .env.example .env && $EDITOR .env (OHM_SECRET_KEY + WATCHTOWER_TOKEN obligatoires) -# 3. podman login git.lanro.eu (compte Gitea requis, même en lecture) -# 4. podman compose -f docker-compose.podman.yml up -d +# 3. podman compose -f docker-compose.podman.yml up -d # (ou podman-compose -f docker-compose.podman.yml up -d) # # Mise à jour : page Admin → « Mise à jour », ou manuellement : @@ -15,7 +14,7 @@ services: ohm: - image: git.lanro.eu/roman/ohm_streaming:latest + image: ${OHM_IMAGE:-ghcr.io/aulyriusohm/ohm-streaming:latest} restart: unless-stopped ports: - "${OHM_PORT:-8777}:8777" diff --git a/docker-compose.yml b/docker-compose.yml index 87f0538..35664f1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,16 +2,18 @@ # # Installation guidée (recommandée) : ./scripts/install.sh # Ou à la main : -# 1. docker login git.lanro.eu (compte Gitea avec accès lecture au repo) -# 2. cp .env.example .env && $EDITOR .env (OHM_SECRET_KEY + WATCHTOWER_TOKEN obligatoires) -# 3. docker compose up -d +# 1. cp .env.example .env && $EDITOR .env (OHM_SECRET_KEY + WATCHTOWER_TOKEN obligatoires) +# 2. docker compose up -d +# +# Image par défaut : GHCR (publique). Pour utiliser le registre Gitea à la place : +# OHM_IMAGE=git.lanro.eu/roman/ohm_streaming:latest dans .env (+ docker login git.lanro.eu) # # Mise à jour : page Admin → « Mise à jour », ou manuellement : # docker compose pull && docker compose up -d services: ohm: - image: git.lanro.eu/roman/ohm_streaming:latest + image: ${OHM_IMAGE:-ghcr.io/aulyriusohm/ohm-streaming:latest} # Build local (dev) : décommenter ces lignes et commenter « image: » ci-dessus # build: # context: . diff --git a/scripts/install.sh b/scripts/install.sh index 30d736f..0b7ba92 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -5,7 +5,7 @@ # bash scripts/install.sh (depuis un clone du dépôt) # curl -fsSL /raw/branch/main/scripts/install.sh | bash # -# Options non interactives : --dir --port --skip-login +# Options non interactives : --dir --port # (les valeurs passées en option court-circuitent les questions) # # Pose les questions (destination des animés, port), génère les secrets, @@ -23,12 +23,11 @@ ok() { printf " ${GREEN}✔${RESET} %s\n" "$1"; } warn() { printf " ${YELLOW}⚠${RESET} %s\n" "$1"; } die() { printf " ${RED}✖ %s${RESET}\n" "$1" >&2; exit 1; } -ARG_DIR="" ARG_PORT="" ARG_SKIP_LOGIN=0 +ARG_DIR="" ARG_PORT="" while [ $# -gt 0 ]; do case "$1" in --dir) ARG_DIR="$2"; shift 2;; --port) ARG_PORT="$2"; shift 2;; - --skip-login) ARG_SKIP_LOGIN=1; shift;; *) shift;; esac done @@ -74,21 +73,6 @@ if [ ! -f "$COMPOSE_FILE" ]; then fi ok "Projet prêt dans $(pwd)" -# ---------------------------------------------------------------- registre privé -step "Accès au registre privé ($REGISTRY_HOST)" -if [ "$ARG_SKIP_LOGIN" = "1" ]; then - warn "--skip-login : connexion au registre ignorée" -elif docker login "$REGISTRY_HOST" 2>/dev/null; then - ok "Connecté au registre" -else - warn "Pas encore connecté — un compte Gitea avec accès lecture au dépôt est requis." - if [ "$(ask "Se connecter maintenant (docker login) ?" "o")" = "o" ]; then - docker login "$REGISTRY_HOST" || die "docker login a échoué — relance le script après t'être connecté." - ok "Connecté au registre" - else - die "Sans docker login, l'image ne pourra pas être tirée." - fi -fi # ---------------------------------------------------------------- destination des épisodes step "Destination des épisodes téléchargés" diff --git a/scripts/release.sh b/scripts/release.sh index 215d3b8..c4c36f4 100644 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # Publie une version d'OhmStreaming : -# bump de version → commit + tag git → build de l'image Docker → push registre Gitea. +# bump de version → commit + tag git → build de l'image Docker → push GHCR (public) + Gitea. # # Usage : ./scripts/release.sh 0.2.0 ["patchnote multi-lignes"] # Option : OHM_REGISTRY=git.lanro.eu/roman/ohm_streaming (défaut) pour viser un autre registre. @@ -8,6 +8,7 @@ set -euo pipefail VERSION="${1:?Usage : ./scripts/release.sh [patchnote] (ex : 0.2.0)}" REGISTRY="${OHM_REGISTRY:-git.lanro.eu/roman/ohm_streaming}" +GHCR="${OHM_GHCR:-ghcr.io/aulyriusohm/ohm-streaming}" cd "$(dirname "$0")/.." [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "✖ « $VERSION » n'est pas un semver X.Y.Z"; exit 1; } @@ -34,11 +35,13 @@ git tag -a "$TAG" -m "${2:-$TAG}" git push origin HEAD git push origin "$TAG" -echo "▶ 3/3 Image Docker → $REGISTRY" -docker build --build-arg VERSION="$VERSION" -t "$REGISTRY:$VERSION" -t "$REGISTRY:latest" . -docker push "$REGISTRY:$VERSION" -docker push "$REGISTRY:latest" +echo "▶ 3/3 Image Docker → $GHCR (public) + $REGISTRY (Gitea)" +docker build --build-arg VERSION="$VERSION" -t "$GHCR:$VERSION" -t "$GHCR:latest" . +docker push "$GHCR:$VERSION" && docker push "$GHCR:latest" +docker tag "$GHCR:$VERSION" "$REGISTRY:$VERSION" +docker tag "$GHCR:latest" "$REGISTRY:latest" +docker push "$REGISTRY:$VERSION" && docker push "$REGISTRY:latest" echo -echo "✔ v$VERSION publiée ($REGISTRY:$VERSION et :latest)" +echo "✔ v$VERSION publiée ($GHCR:$VERSION et :latest — public, miroir Gitea $REGISTRY)" echo " Les instances la détecteront via Admin → Mise à jour → « Vérifier »."