Spaces:
Build error
Build error
| version: '3.8' | |
| services: | |
| # Main application | |
| app: | |
| build: | |
| context: . | |
| dockerfile: Dockerfile | |
| container_name: whatsapp-channel-app | |
| restart: unless-stopped | |
| ports: | |
| - "3000:3000" | |
| environment: | |
| - NODE_ENV=production | |
| - PORT=3000 | |
| - APP_URL=${APP_URL:-http://localhost:3000} | |
| - SESSION_SECRET=${SESSION_SECRET} | |
| - SESSION_TTL_DAYS=30 | |
| - CSRF_SECRET=${CSRF_SECRET} | |
| - ARGON2_MEMORY=65536 | |
| - ARGON2_ITERATIONS=3 | |
| - ARGON2_PARALLELISM=4 | |
| - GROQ_API_KEY=${GROQ_API_KEY} | |
| - GROQ_MODELS=${GROQ_MODELS:-llama-3.1-70b-versatile,llama-3.1-8b-instant,gemma2-9b-it} | |
| - SCRAPER_RATE_LIMIT=10 | |
| - SCRAPER_INTERVAL_MS=6000 | |
| - WHATSAPP_CHANNEL_REGEX=^https://chat\.whatsapp\.com/[A-Za-z0-9]{22}$ | |
| - IPAPI_KEY=${IPAPI_KEY} | |
| - VPN_DETECTION_ENABLED=true | |
| - CAPTCHA_PROVIDER=${CAPTCHA_PROVIDER:-hcaptcha} | |
| - CAPTCHA_SECRET_KEY=${CAPTCHA_SECRET_KEY} | |
| - CAPTCHA_SITE_KEY=${CAPTCHA_SITE_KEY} | |
| - LOG_LEVEL=info | |
| - LOG_DIR=/app/data/logs | |
| - DATA_DIR=/app/data | |
| volumes: | |
| - ./data:/app/data | |
| networks: | |
| - whatsapp-network | |
| depends_on: | |
| - huggingface | |
| deploy: | |
| resources: | |
| limits: | |
| cpus: '2' | |
| memory: 2G | |
| reservations: | |
| cpus: '0.5' | |
| memory: 512M | |
| # Hugging Face inference service (for local AI models if needed) | |
| huggingface: | |
| image: ghcr.io/huggingface/text-generation-inference:latest | |
| container_name: whatsapp-channel-hf | |
| restart: unless-stopped | |
| ports: | |
| - "7860:80" | |
| environment: | |
| - MODEL_ID=${HF_MODEL_ID:-microsoft/DialoGPT-medium} | |
| - MAX_CONCURRENT_REQUESTS=128 | |
| - MAX_BEST_OF=2 | |
| - MAX_STOP_SEQUENCES=4 | |
| - MAX_INPUT_LENGTH=2048 | |
| - MAX_TOTAL_TOKENS=4096 | |
| - WAITING_SERVED_RATIO=1.2 | |
| - MAX_BATCH_PREFILL_TOKENS=4096 | |
| - MAX_BATCH_TOTAL_TOKENS=8192 | |
| volumes: | |
| - hf-cache:/data | |
| networks: | |
| - whatsapp-network | |
| deploy: | |
| resources: | |
| limits: | |
| cpus: '4' | |
| memory: 8G | |
| reservations: | |
| devices: | |
| - driver: nvidia | |
| count: 1 | |
| capabilities: [gpu] | |
| # Redis for session storage (optional - currently using file-based) | |
| # redis: | |
| # image: redis:7-alpine | |
| # container_name: whatsapp-channel-redis | |
| # restart: unless-stopped | |
| # ports: | |
| # - "6379:6379" | |
| # volumes: | |
| # - redis-data:/data | |
| # networks: | |
| # - whatsapp-network | |
| # command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru | |
| # Nginx reverse proxy (optional - for production with SSL) | |
| # nginx: | |
| # image: nginx:alpine | |
| # container_name: whatsapp-channel-nginx | |
| # restart: unless-stopped | |
| # ports: | |
| # - "80:80" | |
| # - "443:443" | |
| # volumes: | |
| # - ./nginx.conf:/etc/nginx/nginx.conf:ro | |
| # - ./certbot/conf:/etc/letsencrypt:ro | |
| # - ./certbot/www:/var/www/certbot:ro | |
| # networks: | |
| # - whatsapp-network | |
| # depends_on: | |
| # - app | |
| networks: | |
| whatsapp-network: | |
| driver: bridge | |
| volumes: | |
| hf-cache: | |
| driver: local | |
| # redis-data: | |
| # driver: local |