Files
MatchLiveTv/infra/.env.production.example
Emiliano Frascaro 52cfffb83f Aggiunge monitoraggio ops: health check, log scanner, dashboard e notifiche.
Introduce incidenti con dedup, job Sidekiq ogni 3 min, scan log cron, /up/deep,
dashboard /admin/ops e push ntfy; include Sentry opzionale e fix test suite.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 08:16:47 +02:00

85 lines
2.9 KiB
Plaintext

# Copia come .env sul server: cp .env.production.example .env
# Genera secret: openssl rand -hex 32
POSTGRES_PASSWORD=CHANGE_ME_STRONG_PASSWORD
SECRET_KEY_BASE=CHANGE_ME_openssl_rand_hex_64
JWT_SECRET=CHANGE_ME_openssl_rand_hex_32
MEDIAMTX_WEBHOOK_SECRET=CHANGE_ME_openssl_rand_hex_32
# RTMP pubblico per telefoni (IP WAN o DDNS + porta 1935)
MEDIAMTX_RTMP_URL=rtmp://www.matchlivetv.it:1935
# Dominio pubblico (Nginx Proxy Manager → Rails :3000)
APP_PUBLIC_URL=https://www.matchlivetv.it
HLS_PUBLIC_URL=https://www.matchlivetv.it/hls
CORS_ORIGINS=https://www.matchlivetv.it,https://matchlivetv.it
ALLOWED_HOSTS=www.matchlivetv.it,matchlivetv.it,192.168.1.146,localhost
YOUTUBE_REDIRECT_URI=https://www.matchlivetv.it/api/v1/youtube/callback
# YouTube OAuth — vedi docs/YOUTUBE_SETUP.md
YOUTUBE_CLIENT_ID=
YOUTUBE_CLIENT_SECRET=
YOUTUBE_PLATFORM_REFRESH_TOKEN=
# Stripe LIVE (Dashboard in modalità Live — non riusare price_ di Test)
# Match Live TV → Premium Light | Match Live TV PRO → Premium Full
STRIPE_SECRET_KEY=sk_live_...
STRIPE_WEBHOOK_SECRET=whsec_... # webhook https://www.matchlivetv.it/webhooks/stripe (modalità Live)
STRIPE_PREMIUM_LIGHT_MONTHLY_PRICE_ID=
STRIPE_PREMIUM_LIGHT_YEARLY_PRICE_ID=
STRIPE_PREMIUM_FULL_MONTHLY_PRICE_ID=
STRIPE_PREMIUM_FULL_YEARLY_PRICE_ID=
STRIPE_PREMIUM_LIGHT_PRICE_ID=
STRIPE_PREMIUM_FULL_PRICE_ID=
RAILS_LOG_LEVEL=info
# Titolare trattamento (GDPR) — obbligatorio in produzione
PRIVACY_CONTROLLER_NAME=Emiliano Frascaro
PRIVACY_CONTROLLER_ADDRESS=Via Guido De Ruggiero, 89 - 20142 - Milano (MI)
PRIVACY_CONTACT_EMAIL=privacy@matchlive.it
PRIVACY_CONTROLLER_VAT=
# Email transazionali (reset password, inviti)
MAILER_FROM=Match Live TV <noreply@matchlive.it>
SMTP_ADDRESS=
SMTP_PORT=587
SMTP_USERNAME=
SMTP_PASSWORD=
SMTP_AUTH=plain
SMTP_STARTTLS=true
PASSWORD_RESET_EXPIRY_HOURS=2
# Disco video dedicato (recordings MediaMTX + dati Garage). Montare es. 800GB su /media/videos
MATCHLIVETV_VIDEOS_ROOT=/media/videos/matchlivetv
# Replay storage — Garage (obbligatorio in produzione per Premium replay)
# Dopo il primo deploy: bash scripts/setup_garage_production.sh (crea garage.prod.toml + chiavi)
REPLAY_STORAGE_ENDPOINT=http://garage:3900
REPLAY_STORAGE_BUCKET=matchlivetv-replays
REPLAY_STORAGE_REGION=garage
REPLAY_STORAGE_ACCESS_KEY_ID=
REPLAY_STORAGE_SECRET_ACCESS_KEY=
REPLAY_STORAGE_FORCE_PATH_STYLE=true
# Ops monitoring — notifiche push (ntfy) e health check
# App ntfy: https://ntfy.sh — iscriviti al topic e imposta OPS_NTFY_URL
OPS_NTFY_URL=https://ntfy.sh/matchlivetv-ops-YOUR_SECRET_TOPIC
OPS_NTFY_TOKEN=
OPS_ALERT_EMAIL=
OPS_NOTIFY_SEVERITIES=critical
OPS_NOTIFY_COOLDOWN_MINUTES=30
OPS_HEALTH_INTERVAL_SECS=180
OPS_HEALTH_TOKEN=
OPS_DISK_WARN_PERCENT=80
OPS_DISK_CRIT_PERCENT=90
OPS_RECORDINGS_WARN_GB=20
OPS_RECORDINGS_CRIT_GB=50
OPS_SIDEKIQ_STALE_SECS=300
OPS_LOG_SUBSCRIBER=false
# Sentry (opzionale — error tracking produzione)
SENTRY_DSN=
SENTRY_TRACES_SAMPLE_RATE=0.1