Spaces:
Running
Running
| # ------------------------------------------------------------------ | |
| # AgentDeck Backend - example environment | |
| # Copy to `.env` (or set these in your deployment) and fill in real values. | |
| # cp .env.example .env | |
| # In production the app REFUSES TO START unless these are set to strong, | |
| # non-default values: | |
| # API_KEY, JWT_SECRET_KEY | |
| # ------------------------------------------------------------------ | |
| # --- App --- | |
| APP_NAME=All API Collection | |
| ENVIRONMENT=production # production | development | |
| HOST=0.0.0.0 | |
| PORT=7860 | |
| WORKERS=1 | |
| LOG_LEVEL=INFO | |
| # --- Auth (required) --- | |
| # Master bearer key for the whole API; must be long & random in production. | |
| API_KEY=change-me-to-a-long-random-value | |
| # Secret used to sign JWTs. Must be long & random (>=32 chars) in production. | |
| JWT_SECRET_KEY=change-me-to-a-long-random-value | |
| JWT_ALGORITHM=HS256 | |
| JWT_ISSUER=all-api-collection | |
| ADMIN_PASSWORD= | |
| # Per-client-IP global rate limit (requests / minute). 0 disables. | |
| RATE_LIMIT_PER_MINUTE=60 | |
| # --- Service enablement --- | |
| # Which API groups are mounted is controlled by services.yaml at the project | |
| # root (set enabled: true/false per service, e.g. google:sheets_api). Point | |
| # this at a different file to override. | |
| # SERVICES_CONFIG_PATH=./services.yaml | |
| # --- URL shortener --- | |
| URL_SHORTENER_SECRET=change-me | |
| URL_SHORTENER_BASE=http://localhost:7860/api/v1 | |
| # --- Limits --- | |
| MAX_UPLOAD_BYTES=15728640 | |
| # --- Embeddings / vector store --- | |
| EMBEDDING_MODEL=ibm-granite/granite-embedding-small-english-r2 | |
| EMBEDDING_DIMENSION=384 | |
| DEFAULT_TOP_K=10 | |
| DATA_DIR=./data | |
| # --- Local on-device extraction (/json/feature-extract) --- | |
| # All keys are optional; unset values fall back to the defaults shown. | |
| # GLINER_MODEL=lion-ai/gliner2-base-v1-onnx | |
| # DEPRECATED: PyTorch model (torch backend) -- restore to roll back: | |
| # GLINER_MODEL=fastino/gliner2-base-v1 | |
| # GLINER_ENABLED=true | |
| # GLINER_DEVICE=cpu | |
| # GLINER_MAX_CONCURRENT=2 | |
| # GLINER_MAX_CONTENT_LENGTH=100000 | |
| # --- Supabase --- | |
| SUPABASE_URL=https://your-project.supabase.co | |
| SUPABASE_ANON_KEY= | |
| SUPABASE_SERVICE_ROLE_KEY= | |
| SUPABASE_SCHEMA=public | |
| # --- Redis (optional; scheduler / caching) --- | |
| REDIS_URL= | |
| REDIS_HOST=localhost | |
| REDIS_PORT=6379 | |
| REDIS_DB=0 | |
| REDIS_PASSWORD= | |
| REDIS_SSL=false | |
| # --- Google Maps / GCP --- | |
| GCP_API_KEY= | |
| GOOGLE_MAPS_BASE_URL=https://maps.googleapis.com/maps/api | |
| # --- Google Cloud Storage --- | |
| GCS_BUCKET_NAME= | |
| GCS_SERVICE_ACCOUNT_KEY_PATH= | |
| # --- Google OAuth / Gmail (optional) --- | |
| GOOGLE_OAUTH_CLIENT_ID= | |
| GOOGLE_OAUTH_CLIENT_SECRET= | |
| # --- Web search (SearXNG) --- | |
| SEARXNG_BASE_URL=http://localhost:8888 | |
| # --- Startup self-ping --- | |
| SELF_PING_URL= | |
| # ------------------------------------------------------------------ | |
| # --- WhatsApp service (single source of truth) --------------------- | |
| # This `.env` is the ONLY configuration file. It is read by the main FastAPI | |
| # app (pydantic-settings) AND, via start.sh / the Docker image, forwarded to | |
| # the internal AgentDeck WhatsApp service (Go) as its process environment. | |
| # The Go service never reads a `.env` of its own — it consumes injected env | |
| # vars only. In a container deployment these values are set on the platform | |
| # (Hugging Face Spaces secrets) and start.sh passes them straight through. | |
| # ------------------------------------------------------------------ | |
| # --- Gateway settings (read by the FastAPI app) --- | |
| # The main app reverse-proxies /api/whatsapp/* to the WhatsApp service. | |
| # When the image embeds the binary (start.sh) the gateway is auto-enabled; | |
| # set explicitly to control it. WHATSAPP_SERVICE_URL may be a service name | |
| # (http://whatsapp-service:8231) when the WhatsApp service runs as a separate | |
| # container, or loopback when co-hosted in this image. | |
| WHATSAPP_SERVICE_ENABLED=false | |
| WHATSAPP_SERVICE_URL=http://127.0.0.1:8231 | |
| WHATSAPP_SERVICE_TIMEOUT=30 | |
| WHATSAPP_SERVICE_CONNECT_TIMEOUT=5 | |
| # Port start.sh launches the embedded Go binary on (its SERVER_PORT). | |
| WHATSAPP_SERVICE_PORT=8231 | |
| # --- Settings forwarded to the Go service (start.sh / Docker) --- | |
| # Global API key of the WhatsApp service. Used by the gateway as the default | |
| # `apikey` header AND injected into the Go process as GLOBAL_API_KEY. | |
| WHATSAPP_SERVICE_GLOBAL_API_KEY= | |
| # The Go service requires: SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY (injected | |
| # as SUPABASE_SERVICE_KEY), SUPABASE_DB_URL, REDIS_URL, GLOBAL_API_KEY (see | |
| # WHATSAPP_SERVICE_GLOBAL_API_KEY) and DATABASE_SAVE_MESSAGES. SUPABASE_URL | |
| # and REDIS_URL are the shared values defined above; SUPABASE_SERVICE_ROLE_KEY | |
| # is mapped to the Go service's expected name (SUPABASE_SERVICE_KEY) for you. | |
| # SUPABASE_DB_URL is a direct native-Postgres connection string (used by the | |
| # whatsmeow session store — NOT the PostgREST URL): | |
| SUPABASE_DB_URL=postgresql://postgres:postgres@db.your-project.supabase.co:5432/postgres | |
| DATABASE_SAVE_MESSAGES=false | |
| CLIENT_NAME=agentdeck | |
| CONNECT_ON_STARTUP=false | |
| # Optional WhatsApp service behaviour (documented defaults = Go service defaults). | |
| DEBUG_ENABLED=INFO # whatsmeow debug level (mapped from legacy WADEBUG) | |
| LOG_TYPE=console # console | file | |
| WEBHOOK_FILES=true | |
| OS_NAME=AgentDeck | |
| WHATSAPP_VERSION_MAJOR=2 | |
| WHATSAPP_VERSION_MINOR=3000 | |
| WHATSAPP_VERSION_PATCH=1 | |
| # EVENT_IGNORE_GROUP=false | |
| # EVENT_IGNORE_STATUS=false | |
| # QRCODE_MAX_COUNT=5 | |
| # CHECK_USER_EXISTS=true | |
| # MinIO media storage (only if MINIO_ENABLED=true). | |
| MINIO_ENABLED=false | |
| # MINIO_ENDPOINT=localhost:9000 | |
| # MINIO_ACCESS_KEY=minioadmin | |
| # MINIO_SECRET_KEY=minioadmin | |
| # MINIO_BUCKET=agentdeck-media | |
| # MINIO_USE_SSL=false | |
| # MINIO_REGION= | |
| # RabbitMQ / NATS event producers (optional). | |
| # AMQP_URL=amqp://admin:admin@localhost:5672/default | |
| # AMQP_GLOBAL_ENABLED=false | |
| # AMQP_GLOBAL_EVENTS= | |
| # AMQP_SPECIFIC_EVENTS= | |
| # NATS_URL= | |
| # NATS_GLOBAL_ENABLED=false | |
| # NATS_GLOBAL_EVENTS= | |
| # WEBHOOK_URL= | |
| # Outbound proxy for the WhatsApp service (optional). | |
| # PROXY_PROTOCOL=http # http | https | socks5 | |
| # PROXY_HOST= | |
| # PROXY_PORT= | |
| # PROXY_USERNAME= | |
| # PROXY_PASSWORD= | |
| # Audio converter (optional). | |
| # API_AUDIO_CONVERTER= | |
| # API_AUDIO_CONVERTER_KEY= | |
| # Logger rotation (optional). | |
| # LOG_MAX_SIZE=100 # MB | |
| # LOG_MAX_BACKUPS=5 | |
| # LOG_MAX_AGE=30 # days | |
| # LOG_DIRECTORY=./logs | |
| # LOG_COMPRESS=true | |
| # --- Concurrency --- | |
| # Shared thread pool worker count. Unset => auto-calc min(32, cpu_count+4). | |
| CORE_CONCURRENCY= | |
| # --- PaddleOCR PP-OCRv6 (ONNX Runtime) --- | |
| # OCR_ENGINE=onnxruntime # paddle | paddle_static | paddle_dynamic | onnxruntime | transformers | |
| # OCR_DEVICE=cpu | |
| # OCR_LANG= # e.g. en; empty uses model defaults | |
| # OCR_DET_MODEL_NAME=PP-OCRv6_small_det | |
| # OCR_REC_MODEL_NAME=PP-OCRv6_small_rec | |
| # OCR_USE_DOC_ORIENTATION_CLASSIFY=false | |
| # OCR_USE_DOC_UNWARPING=false | |
| # OCR_USE_TEXTLINE_ORIENTATION=true | |
| # OCR_MAX_CONCURRENT=1 # max parallel predict calls on shared engine | |
| # Enrich raw/OCR content into labeled Markdown before LLM extraction (default true). | |
| CONTENT_STRUCTURE_ENRICHMENT=true | |