2 Commits
6 changed files with 124 additions and 33 deletions
+2
View File
@@ -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 \
+54 -5
View File
@@ -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 privé du Gitea** — rien n'est publié publiquement.
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
@@ -36,7 +59,33 @@ docker compose up -d
```
Puis ouvrir http://localhost:8777 — le **premier compte créé est administrateur**.
Les données (`data/`, `downloads/`) sont montées en volumes : elles survivent aux
Les données (`data/`, `downloads/`) sont montées en volumes : elles survivent aux mises à jour.
### Variante Podman
Même déploiement via `docker-compose.podman.yml` (socket Podman pour Watchtower,
au lieu du socket Docker) :
```bash
# 0. Socket Podman (une seule fois) — rootless :
systemctl --user enable --now podman.socket
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
git clone https://git.lanro.eu/Roman/ohm_streaming.git && cd ohm_streaming
# 2. Configuration locale (identique à Docker)
cp .env.example .env # → OHM_SECRET_KEY et WATCHTOWER_TOKEN obligatoires
# 3. Démarrage
podman compose -f docker-compose.podman.yml up -d
# (« podman compose » délègue à docker-compose ; sinon : podman-compose)
```
La mise à jour depuis la page Admin (bouton Watchtower) fonctionne à l'identique ;
à la main : `podman compose -f docker-compose.podman.yml pull && podman compose -f docker-compose.podman.yml up -d`.
### Bibliothèque Plex / Sonarr existante
+51
View File
@@ -0,0 +1,51 @@
# Déploiement OhmStreaming sous Podman — variante de docker-compose.yml
#
# 1. Activer le socket Podman (une seule fois) :
# rootless : systemctl --user enable --now podman.socket
# 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
# 2. cp .env.example .env && $EDITOR .env (OHM_SECRET_KEY + WATCHTOWER_TOKEN obligatoires)
# 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 :
# podman compose -f docker-compose.podman.yml pull && podman compose -f docker-compose.podman.yml up -d
services:
ohm:
image: ${OHM_IMAGE:-ghcr.io/aulyriusohm/ohm-streaming:latest}
restart: unless-stopped
ports:
- "${OHM_PORT:-8777}:8777"
env_file: .env
environment:
# Chemins internes (volumes ci-dessous) — ne pas changer
OHM_DATA_DIR: /data
OHM_DOWNLOAD_DIR: /downloads
OHM_DATABASE_PATH: /data/ohm.db
# Watchtower compagnon sur le réseau interne compose
OHM_WATCHTOWER_URL: http://watchtower:8080
OHM_WATCHTOWER_TOKEN: ${WATCHTOWER_TOKEN:?WATCHTOWER_TOKEN manquant — voir .env.example}
volumes:
# Fedora/SELinux : suffixer de « :z » en cas d'erreur « Permission denied »
- ./data:/data
- ./downloads:/downloads
# Compagnon de mise à jour : recrée le conteneur ohm quand l'admin le demande
# (API HTTP interne uniquement, aucun port publié sur l'hôte)
watchtower:
image: containrrr/watchtower
restart: unless-stopped
volumes:
# Socket Podman (compatible API Docker) au lieu de /var/run/docker.sock
- ${PODMAN_SOCKET:-/run/podman/podman.sock}:/var/run/docker.sock
environment:
# Pas de vérification périodique : uniquement sur appel de l'admin
WATCHTOWER_HTTP_API_UPDATE: "true"
WATCHTOWER_HTTP_API_TOKEN: ${WATCHTOWER_TOKEN:?WATCHTOWER_TOKEN manquant — voir .env.example}
# Ne mettre à jour que les conteneurs étiquetés (ohm), pas watchtower lui-même
WATCHTOWER_LABEL_ENABLE: "true"
# Pas de DOCKER_API_VERSION : Podman annonce lui-même la version d'API
# Supprimer les anciennes images après mise à jour
WATCHTOWER_CLEANUP: "true"
+6 -4
View File
@@ -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: .
+2 -18
View File
@@ -5,7 +5,7 @@
# bash scripts/install.sh (depuis un clone du dépôt)
# curl -fsSL <gitea>/raw/branch/main/scripts/install.sh | bash
#
# Options non interactives : --dir <chemin> --port <n> --skip-login
# Options non interactives : --dir <chemin> --port <n>
# (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"
+9 -6
View File
@@ -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 <version> [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 »."