# Pictorium — esempio configurazione env (copia in .env.local) # Vedi README.md "Variabili d'Ambiente" e docs/INTEGRATION.md per dettagli completi. # # Il prefisso canonico è PICTORIUM_*. Le vecchie POSTERIUM_* restano accettate # come fallback (con warning di deprecazione) per non rompere deploy esistenti. # === Chiavi API (priorità: header x-api-key > query api_key > fallback d'istanza) === # Fallback d'istanza opt-in per deploy personali single-user (NON usare su istanze pubbliche multi-utente): # PICTORIUM_TMDB_KEY=your_tmdb_v3_key # PICTORIUM_MDBLIST_KEY=your_mdblist_key # PICTORIUM_TVDB_API_KEY=your_tvdb_key # === Storage === # Redis nativo (TCP) per HA multi-replica senza /data — vince su KV_REST_* se entrambi settati: # PICTORIUM_REDIS_URL=redis://:password@redis-master:6379/0 # (su ElfHosted/K8s basta REDIS_URL: è letto come fallback nudo) # KV_REST_API_URL=https://xxx.upstash.io # KV_REST_API_TOKEN=xxx # PICTORIUM_DATA_DIR=/data # === Render pipeline === # PICTORIUM_MAX_CONCURRENT_RENDERS=4 # PICTORIUM_RENDER_SLOT_WAIT_MS=15000 # PICTORIUM_RENDER_TIMEOUT_MS=30000 # PICTORIUM_CACHE_MAX_MB=150 # PICTORIUM_CACHE_MAX=2000 # === Auth & rate limit === # PICTORIUM_PUBLIC_INSTANCE=1 # =1: route admin aperte senza token (LAN fidata/demo). Su istanze esposte lascia 0 + token qui sotto # PICTORIUM_ADMIN_TOKEN=supersegreto # istanze private: incollalo in Impostazioni → Token admin (solo sessione) per usare warmup/cache/save dalla UI # PICTORIUM_ALLOW_DEV_ADMIN=1 # solo in dev: apre admin ovunque (default: solo loopback) # PICTORIUM_WARMUP_TOKEN=warmup-segreto # PICTORIUM_RATELIMIT_POSTER_MAX=200 # PICTORIUM_LOG_LEVEL=info # PICTORIUM_LOG_FORMAT=human # PICTORIUM_TRUST_PROXY=1 # PICTORIUM_ALLOWED_HOSTS=example.com # === Config token & profili === # PICTORIUM_MULTI_USER=1 # home = gate profili stile AIO (crea/seleziona spazio UUID); il primo spazio eredita mapping+default globali # PICTORIUM_MAX_USERS=500 # cap anti-Sybil sul numero di spazi (0 o assente = illimitati) # PICTORIUM_MAX_MAPPINGS_PER_USER=500 # quota poster personalizzati per spazio (default: 500) # CONFIG_HMAC_SECRET=segreto-firma-token # senza, i ?config= non sono firmati (fail-closed in prod) # PROFILE_ENCRYPTION_KEY=chiave-32-byte-hex # senza, le chiavi profilo restano in chiaro (warning in prod) # === Region & warmup === # PICTORIUM_REGION=IT # PICTORIUM_SELF_WARMUP=1 # === Sponsor / hosting pubblico === # PICTORIUM_HOSTED_BY=elfhosted # mostra il banner sponsor (solo "elfhosted" attivo, vuoto = nessun banner) # === Custom Rating Provider === # Endpoint e header anche dall'editor (vince sull'env); la chiave SOLO env. # PICTORIUM_CUSTOM_RATING_ENABLED=1 # PICTORIUM_CUSTOM_RATING_ENDPOINT=https://example.com/ratings/{imdbId} # PICTORIUM_CUSTOM_RATING_API_KEY=segreto-provider # PICTORIUM_CUSTOM_RATING_API_KEY_HEADER=X-API-Key # PICTORIUM_CUSTOM_RATINGS=1 # default display riga (overridabile per-titolo) # === Docker (solo compose) === # PICTORIUM_BIND_IP=127.0.0.1 # bind host (default 0.0.0.0) # PICTORIUM_HOST_PORT=8080 # porta host (interna resta 8080) # === Sharp & build === # SHARP_CONCURRENCY=2 # SHARP_CACHE_MEMORY_MB=64 # NODE_MAX_OLD_SPACE=384