Files
insta-recipe/.env.example
T
Giancarmine SalucciandClaude Opus 4.8 ba5e397788
Build & Push Docker Image / test-and-build (push) Successful in 1m44s
feat: add Mealie upload target (Tandoor replacement)
InstaChef could only upload to Tandoor. Add a Mealie provider and a
RECIPE_TARGET selector so the queue uploads to Mealie (cook.sal.giize.com).

- mealie-config.ts / mealie.ts: two-step create (POST /api/recipes -> slug,
  PATCH /api/recipes/{slug}) + multipart image PUT. Ingredients sent as
  free-text notes (Mealie PATCH rejects structured unit/food without an id).
- queue/config.ts: `target` ('mealie'|'tandoor', defaults to mealie when
  MEALIE_TOKEN set) + mealie config block.
- QueueProcessor.uploadPhase: branch on target; store mealieSlug.
- QueueManager/types: build public recipe URL, add mealieSlug/recipeUrl.
- tests: buildMealiePatch mapping (free-text notes, placeholder step).
- docs/mealie-adapter-scope.md + .env.example MEALIE_* vars.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 14:48:13 +02:00

114 lines
4.9 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ==============================================================================
# InstaRecipe - Environment Configuration
# ==============================================================================
# Copy this file to .env and update with your values
# Some variables have sensible defaults and are optional
# ==============================================================================
# LLM Configuration (REQUIRED)
# ==============================================================================
# OpenAI-compatible API endpoint. Production: llama-swap on ideapad.
# llama-swap loads models on demand and unloads them after globalTTL (10 min).
OPENAI_BASE_URL=http://192.168.1.50:8080/v1
# API key for authentication (llama-swap accepts any non-empty value).
OPENAI_API_KEY=sk-llama-local
# Model to use for recipe extraction. Available on the ideapad llama-swap stack:
# gemma4-e4b-q6k (recommended — 4B, 65k ctx, 31 TPS)
# gemma4-e2b-q8_0 (faster — 2B, 65k ctx, 55 TPS)
# qwen3.5-4b-q8_0 (fallback — 22 TPS)
# phi4-mini-q8_0, granite-3.3-8b-q6k, plus larger MoE variants
LLM_MODEL=gemma4-e4b-q6k
# Per-request LLM timeout in ms. Must cover llama-swap cold-load (~5–30s for
# small models) plus generation time. A full structured recipe parse on a local
# ~4B model can take several minutes, so allow generous headroom (default 120000
# is too low for slower hardware — 300000 recommended).
LLM_REQUEST_TIMEOUT_MS=300000
# ==============================================================================
# Queue Configuration (OPTIONAL)
# ==============================================================================
# Number of recipes to process simultaneously (default: 2)
QUEUE_CONCURRENCY=2
# Maximum retry attempts for failed extractions (default: 3)
QUEUE_MAX_RETRIES=3
# ==============================================================================
# Tandoor Integration (OPTIONAL)
# ==============================================================================
# Enable automatic upload to Tandoor Recipe Manager
TANDOOR_ENABLED=true
# Tandoor server URL (no trailing slash)
TANDOOR_SERVER_URL=https://cook.gsalucci.cloud/
# Tandoor space ID (default: 1)
TANDOOR_SPACE=1
# Tandoor API token (generate in Tandoor settings)
TANDOOR_TOKEN=tda_f9460962_c8dd_491a_a716_f11b0b3288f0
# ==============================================================================
# Mealie Integration (Tandoor replacement)
# ==============================================================================
# Which cookbook the queue uploads to: 'mealie' or 'tandoor'.
# Defaults to 'mealie' when MEALIE_TOKEN is set, else 'tandoor'.
RECIPE_TARGET=mealie
# Mealie server URL (no trailing slash). Public host, or internal http://mealie:9000
MEALIE_SERVER_URL=https://cook.sal.giize.com
# Mealie API token (Mealie: Settings > API Tokens)
MEALIE_TOKEN=
# Group slug used to build recipe view URLs (self-host default: home)
MEALIE_GROUP_SLUG=home
# ==============================================================================
# Push Notifications (OPTIONAL)
# ==============================================================================
# Web Push VAPID keys for browser notifications
# Generate with: npx web-push generate-vapid-keys
# Default keys are provided for testing but should be changed in production
# VAPID Public Key
VAPID_PUBLIC_KEY=BNextdcB_fQ0BVvyGioM5L8Tf9vKQjs-WnF-rUbnU8MdWIZQYfggIHxBnW21I-lq_0HykLCdMpYj8d5joavWdxQ
# VAPID Private Key
VAPID_PRIVATE_KEY=JwxI_KcsBcehYcTOufMcbVWJjCq1QbH5FJmSyQuG680
# ==============================================================================
# Instagram Extraction Backend
# ==============================================================================
# Which extractor to use:
# ytdlp (default) — yt-dlp subprocess, stateless, Sablier-safe
# playwright — legacy Playwright stealth scraper, requires
# secrets/auth.json + AUTH_SCHEDULER_* below
EXTRACTOR_BACKEND=ytdlp
# Optional Netscape-format cookies file for login-walled reels.
# yt-dlp picks it up automatically if it exists at /app/secrets/cookies.txt
# (Docker) or ./secrets/cookies.txt (local). No automation; export from a
# browser when an extraction starts hitting login walls.
# ==============================================================================
# Authentication Scheduler (LEGACY — only relevant when EXTRACTOR_BACKEND=playwright)
# ==============================================================================
# Enable automatic Instagram authentication renewal (Playwright backend only)
AUTH_SCHEDULER_ENABLED=true
# Renewal interval in minutes (default: 720 = 12 hours)
AUTH_SCHEDULER_INTERVAL_MINUTES=15
# ==============================================================================
# Development Settings
# ==============================================================================
# Node.js environment (production or development)
NODE_ENV=production
# Port for the application (default: 3000)
PORT=3000