pryscraper/.env.example
cryptorugmunch 1f9e71d294 refactor(settings): unify config.py, mconfig.py, and settings.py into single PrySettings
- Merge all configuration into settings.py with PRY_* env var prefix.
- Add legacy env aliases (PROXY_URL, TOR_ENABLED, MAX_RETRIES, etc.) for migration.
- Load and persist runtime overrides from JSON config file (default /app/config.json).
- Update scraper.py, deps.py, routers/config.py to use unified settings.
- Add resolved_proxy_chain and resolved_proxy_url properties.
- Replace tests/test_mconfig.py with tests/test_settings.py (9 tests).
- Update .env.example with new PRY_* options.
- All 500 tests pass; ruff clean.
2026-07-03 05:04:29 +02:00

94 lines
2.9 KiB
Text

# SPDX-License-Identifier: MIT
# Copyright (c) 2026 Rug Munch Media LLC
# Part of Pry - https://git.rugmunch.io/RugMunchMedia/pryscraper
# Licensed under MIT. See LICENSE.
# ── Pry Configuration ──
# Copy this to .env and adjust values. All PRY_* vars are auto-loaded.
#
# ── SECRET BACKEND (see secrets_backend.py) ──
# Pry resolves secrets via secrets_backend.get_secret(name). Default backend is gopass.
# Override with PRY_SECRET_BACKEND:
# gopass (default) - reads from the gopass store under pry/<name>
# env - reads from os.environ (PRY_<NAME> or PRY_<name>)
# file - reads from PRY_ENV_FILE (default: $PRY_DATA_DIR/.env)
# auto - tries gopass, falls back to env (default)
#
# Seed initial secrets (one time):
# gopass insert -m pry/jwt_secret # opens editor, paste a strong random value
# gopass insert -m pry/api_key
# gopass insert -m pry/x402_wallet # your receiving EVM/Solana address
# gopass insert -m pry/x402_facilitator # https://x402.org/facilitator or your own
#
# Per the SECURITY.md contract, NO secrets live in .env in production.
# .env is for local dev and CI only.
# ── Core ──
PRY_HOST=0.0.0.0
PRY_PORT=8002
PRY_URL=http://localhost:8002
# Root directory for Pry's on-disk data (quality, monitors, sessions, etc.).
# Defaults to ~/.pry. Override for production (e.g., /var/lib/pry) or tests (e.g., /tmp/pry-test).
# PRY_DATA_DIR=~/.pry
# ── LLM / AI ──
# Ollama endpoint (used for summarization, categorization, extraction)
PRY_OLLAMA_URL=http://100.100.18.18:11434
# OpenRouter API key (optional — used for vision model queries)
# PRY_OPENROUTER_API_KEY=sk-or-v1-...
# ── Web Scraping ──
# FlareSolverr endpoint for Cloudflare bypass
PRY_FLARESOLVERR_URL=http://flaresolverr:8191/v1
# ── Webhook ──
# Secret used to sign job completion webhooks
# PRY_WEBHOOK_SECRET=pry-webhook-secret
# ── Authentication ──
# API key for endpoint authentication (empty = auth disabled)
# Set a strong random key to protect your Pry instance
# PRY_API_KEY=
# ── Proxy / Tor ──
# PRY_PROXY_URL=http://proxy:8080
# PRY_PROXY_TYPE=http
# PRY_PROXY_USERNAME=user
# PRY_PROXY_PASSWORD=pass
# PRY_TOR_ENABLED=false
# PRY_TOR_SOCKS5_HOST=tor
# PRY_TOR_SOCKS5_PORT=9050
# ── Rotation / Retry ──
# PRY_IP_ROTATION=
# PRY_MAX_RETRIES=3
# PRY_MIN_QUALITY=50
# PRY_RATE_LIMIT_RPM=120
# ── Redis ──
# PRY_REDIS_URL=redis://localhost:6379/0
# ── Database ──
# PRY_DATABASE_URL=postgresql+asyncpg://pry:pry@localhost/pry
# ── Stealth ──
# PRY_STEALTH_ENABLED=true
# PRY_RANDOM_USER_AGENT=true
# PRY_WEBDRIVER_OVERRIDE=true
# PRY_CANVAS_NOISE=true
# PRY_WEBRTC_DISABLE=true
# PRY_GEOLOCATION_SPOOF=true
# PRY_MIN_DELAY_MS=500
# PRY_MAX_DELAY_MS=3000
# ── Output ──
# PRY_DEFAULT_FORMAT=markdown
# PRY_MAX_CHARS=100000
# PRY_INCLUDE_LINKS=true
# ── x402 / MCP ──
# PRY_X402_ENABLED=false
# PRY_X402_PAY_TO=
# PRY_MCP_ENABLED=true