Déploiement VPS via image ghcr pré-buildée (docker-compose.ghcr.yml)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Valentin 2026-07-17 15:05:39 +02:00
parent 6bad2f3805
commit 070e7d7d67
2 changed files with 42 additions and 1 deletions

View file

@ -28,8 +28,23 @@
## 🚀 Déploiement (VPS, Docker)
### Option A — image pré-buildée (recommandé, aucun build local)
Le CI GitHub Actions publie l'image sur **ghcr.io** à chaque push sur `main`. Le package étant privé, connectez-vous d'abord avec un [PAT](https://github.com/settings/tokens) ayant le scope `read:packages` :
```bash
git clone <votre-repo> ranger && cd ranger
echo <PAT_read:packages> | docker login ghcr.io -u vatax3 --password-stdin
# récupérez le docker-compose.ghcr.yml (ou clonez le repo), puis :
docker compose -f docker-compose.ghcr.yml up -d
```
Pour mettre à jour : `docker compose -f docker-compose.ghcr.yml pull && docker compose -f docker-compose.ghcr.yml up -d`.
### Option B — build depuis les sources
```bash
git clone https://github.com/vatax3/ranger.git && cd ranger
docker compose up -d --build
```

26
docker-compose.ghcr.yml Normal file
View file

@ -0,0 +1,26 @@
services:
ranger:
# Image pré-buildée par le CI GitHub Actions (aucun build local nécessaire).
# Le package est privé : sur le VPS, faire au préalable
# echo <PAT_read:packages> | docker login ghcr.io -u vatax3 --password-stdin
image: ghcr.io/vatax3/ranger:latest
container_name: ranger
restart: unless-stopped
pull_policy: always
ports:
- "7000:7000"
environment:
- PORT=7000
- RANGER_DB=/data/ranger.db
# TTLs de cache (secondes) — décommenter pour surcharger
# - RANGER_TTL_CACHED=21600
# - RANGER_TTL_UNCACHED=1200
# - RANGER_TTL_SEARCH=1800
# Proxy sortant optionnel (si l'IP du VPS est bloquée sans StremThru)
# - HTTP_PROXY=http://user:pass@proxyhost:port
# - HTTPS_PROXY=http://user:pass@proxyhost:port
volumes:
- ranger_data:/data
volumes:
ranger_data: