version: "3.8"

services:
  scraper-google:
    build:
      context: ../../
      dockerfile: services/scraper-google/Dockerfile
    container_name: jobs-scraper-google
    environment:
      DB_HOST: shared_postgres
      DB_PORT: 5432
      DB_NAME: jobs_scraper
      DB_USER: scraper_user
      DB_PASSWORD: Cocowawa_12345

      # OpenRouter Configuration
      OPENROUTER_API_KEY: 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
      CV_AI_MODEL: alibaba/tongyi-deepresearch-30b-a3b:free

      # Optional: OpenAI Configuration
      OPENAI_API_KEY: sk-GtdLX9YBOCsBEgBL4rBONA
      OPENAI_BASE_URL: https://hubai.loe.gg/v1
      OPEN_AI_MODEL: gpt-4o-mini

      # Chrome/Chromedp Configuration
      CHROMEDP_DISABLE_GPU: true
      CHROMEDP_NO_SANDBOX: true
    networks:
      - proxy
    restart: unless-stopped
    deploy:
      resources:
        limits:
          memory: 2G
          cpus: "2"
        reservations:
          memory: 512M
          cpus: "0.5"

networks:
  proxy:
    external: true
