From 4aafed3d3191c44239566021ce3d5b6eec6a5d10 Mon Sep 17 00:00:00 2001 From: Froidefond Julien Date: Wed, 11 Mar 2026 21:53:04 +0100 Subject: [PATCH] =?UTF-8?q?docs(readme):=20documenter=20toutes=20les=20var?= =?UTF-8?q?iables=20d'env=20avec=20valeurs=20par=20d=C3=A9faut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Réorganise le tableau des variables par service (partagées, API, Indexer, Backoffice) - Ajoute les variables thumbnail manquantes (THUMBNAIL_*) - Met à jour l'exemple docker-compose : env inline, optionnelles commentées avec valeur par défaut - Supprime env_file en faveur de variables explicites - Corrige le port backoffice dev (3000 → 7082) Co-Authored-By: Claude Sonnet 4.6 --- README.md | 95 ++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 69 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 83fe3cb..c2fcf8a 100644 --- a/README.md +++ b/README.md @@ -82,7 +82,7 @@ npm install npm run dev ``` -The backoffice will be available at http://localhost:3000 +The backoffice will be available at http://localhost:7082 ## Features @@ -111,17 +111,42 @@ The backoffice will be available at http://localhost:3000 ## Environment Variables -| Variable | Description | Default | -|----------|-------------|---------| -| `API_LISTEN_ADDR` | API service bind address | `0.0.0.0:7080` | -| `INDEXER_LISTEN_ADDR` | Indexer service bind address | `0.0.0.0:7081` | -| `BACKOFFICE_PORT` | Backoffice web UI port | `7082` | -| `DATABASE_URL` | PostgreSQL connection string | `postgres://stripstream:stripstream@postgres:5432/stripstream` | -| `MEILI_URL` | Meilisearch connection URL | `http://meilisearch:7700` | -| `MEILI_MASTER_KEY` | Meilisearch master key (required) | - | -| `API_BOOTSTRAP_TOKEN` | Initial API admin token (required) | - | -| `INDEXER_SCAN_INTERVAL_SECONDS` | Watcher scan interval | `5` | -| `LIBRARIES_ROOT_PATH` | Path to libraries directory | `/libraries` | +Variables marquées **required** doivent être définies. Les autres ont une valeur par défaut. + +### Partagées (API + Indexer) + +| Variable | Description | Défaut | +|----------|-------------|--------| +| `DATABASE_URL` | **required** — Connexion PostgreSQL | — | +| `MEILI_URL` | **required** — URL Meilisearch | — | +| `MEILI_MASTER_KEY` | **required** — Clé maître Meilisearch | — | + +### API + +| Variable | Description | Défaut | +|----------|-------------|--------| +| `API_BOOTSTRAP_TOKEN` | **required** — Token admin initial | — | +| `API_LISTEN_ADDR` | Adresse d'écoute | `0.0.0.0:7080` | + +### Indexer + +| Variable | Description | Défaut | +|----------|-------------|--------| +| `INDEXER_LISTEN_ADDR` | Adresse d'écoute | `0.0.0.0:7081` | +| `INDEXER_SCAN_INTERVAL_SECONDS` | Intervalle de scan du watcher | `5` | +| `THUMBNAIL_ENABLED` | Activer la génération de thumbnails | `true` | +| `THUMBNAIL_DIRECTORY` | Dossier de stockage des thumbnails | `/data/thumbnails` | +| `THUMBNAIL_WIDTH` | Largeur max des thumbnails (px) | `300` | +| `THUMBNAIL_HEIGHT` | Hauteur max des thumbnails (px) | `400` | +| `THUMBNAIL_QUALITY` | Qualité WebP (0–100) | `80` | +| `THUMBNAIL_FORMAT` | Format de sortie | `webp` | + +### Backoffice + +| Variable | Description | Défaut | +|----------|-------------|--------| +| `API_BOOTSTRAP_TOKEN` | **required** — Token d'accès à l'API | — | +| `API_BASE_URL` | URL interne de l'API (dans le réseau Docker) | `http://api:7080` | ## API Documentation @@ -185,37 +210,55 @@ services: meilisearch: image: getmeili/meilisearch:v1.12 environment: - MEILI_MASTER_KEY: ${MEILI_MASTER_KEY} + MEILI_MASTER_KEY: your_meili_master_key # required — change this api: image: julienfroidefond32/stripstream-api:latest - env_file: - - .env ports: - "7080:7080" volumes: - - ${LIBRARIES_HOST_PATH:-./libraries}:/libraries - - ${THUMBNAILS_HOST_PATH:-./data/thumbnails}:/data/thumbnails + - ./libraries:/libraries + - ./data/thumbnails:/data/thumbnails + environment: + # --- Required --- + DATABASE_URL: postgres://stripstream:stripstream@postgres:5432/stripstream + MEILI_URL: http://meilisearch:7700 + MEILI_MASTER_KEY: your_meili_master_key # must match meilisearch above + API_BOOTSTRAP_TOKEN: your_bootstrap_token # required — change this + # --- Optional (defaults shown) --- + # API_LISTEN_ADDR: 0.0.0.0:7080 indexer: image: julienfroidefond32/stripstream-indexer:latest - env_file: - - .env ports: - "7081:7081" volumes: - - ${LIBRARIES_HOST_PATH:-./libraries}:/libraries - - ${THUMBNAILS_HOST_PATH:-./data/thumbnails}:/data/thumbnails + - ./libraries:/libraries + - ./data/thumbnails:/data/thumbnails + environment: + # --- Required --- + DATABASE_URL: postgres://stripstream:stripstream@postgres:5432/stripstream + MEILI_URL: http://meilisearch:7700 + MEILI_MASTER_KEY: your_meili_master_key # must match meilisearch above + # --- Optional (defaults shown) --- + # INDEXER_LISTEN_ADDR: 0.0.0.0:7081 + # INDEXER_SCAN_INTERVAL_SECONDS: 5 + # THUMBNAIL_ENABLED: true + # THUMBNAIL_DIRECTORY: /data/thumbnails + # THUMBNAIL_WIDTH: 300 + # THUMBNAIL_HEIGHT: 400 + # THUMBNAIL_QUALITY: 80 + # THUMBNAIL_FORMAT: webp backoffice: image: julienfroidefond32/stripstream-backoffice:latest - env_file: - - .env - environment: - - PORT=7082 - - HOST=0.0.0.0 ports: - "7082:7082" + environment: + # --- Required --- + API_BOOTSTRAP_TOKEN: your_bootstrap_token # must match api above + # --- Optional (defaults shown) --- + # API_BASE_URL: http://api:7080 volumes: postgres_data: