Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Supabase client is not configured. #169

Closed
panw3i opened this issue May 21, 2024 · 4 comments
Closed

Error: Supabase client is not configured. #169

panw3i opened this issue May 21, 2024 · 4 comments
Labels
question Further information is requested self-host

Comments

@panw3i
Copy link

panw3i commented May 21, 2024

docker-compose

name: firecrawl
version: '3.9'
services:
  playwright-service:
    build: apps/playwright-service
    environment:
      - PORT=3000
    networks:
      - backend
  
  api:
    build: apps/api
    environment:
      - REDIS_URL=${REDIS_URL:-redis://redis:6379}
      - PLAYWRIGHT_MICROSERVICE_URL=${PLAYWRIGHT_MICROSERVICE_URL:-http://playwright-service:3000}
      - USE_DB_AUTHENTICATION=false
      - PORT=${PORT:-3002}
      - NUM_WORKERS_PER_QUEUE=${NUM_WORKERS_PER_QUEUE}
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - SLACK_WEBHOOK_URL=${SLACK_WEBHOOK_URL}
      - SERPER_API_KEY=${SERPER_API_KEY}
      - LLAMAPARSE_API_KEY=${LLAMAPARSE_API_KEY}
      - LOGTAIL_KEY=${LOGTAIL_KEY}
      - BULL_AUTH_KEY=${BULL_AUTH_KEY}
      - TEST_API_KEY=${TEST_API_KEY}
      - POSTHOG_API_KEY=${POSTHOG_API_KEY}
      - POSTHOG_HOST=${POSTHOG_HOST}
      - SUPABASE_ANON_TOKEN=${SUPABASE_ANON_TOKEN}
      - SUPABASE_URL=${SUPABASE_URL}
      - SUPABASE_SERVICE_TOKEN=${SUPABASE_SERVICE_TOKEN}
      - SCRAPING_BEE_API_KEY=${SCRAPING_BEE_API_KEY}
      - HOST=${HOST:-0.0.0.0}
    depends_on:
      - redis
      - playwright-service
    ports:
      - "3002:3002"
    command: [ "pnpm", "run", "start:production" ]
    networks:
      - backend

  worker:
    build: apps/api
    environment:
      - REDIS_URL=${REDIS_URL:-redis://redis:6379}
      - PLAYWRIGHT_MICROSERVICE_URL=${PLAYWRIGHT_MICROSERVICE_URL:-http://playwright-service:3000}
      - USE_DB_AUTHENTICATION=false
      - PORT=${PORT:-3002}
      - NUM_WORKERS_PER_QUEUE=${NUM_WORKERS_PER_QUEUE}
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - SLACK_WEBHOOK_URL=${SLACK_WEBHOOK_URL}
      - SERPER_API_KEY=${SERPER_API_KEY}
      - LLAMAPARSE_API_KEY=${LLAMAPARSE_API_KEY}
      - LOGTAIL_KEY=${LOGTAIL_KEY}
      - BULL_AUTH_KEY=${BULL_AUTH_KEY}
      - TEST_API_KEY=${TEST_API_KEY}
      - POSTHOG_API_KEY=${POSTHOG_API_KEY}
      - POSTHOG_HOST=${POSTHOG_HOST}
      - SUPABASE_ANON_TOKEN=${SUPABASE_ANON_TOKEN}
      - SUPABASE_URL=${SUPABASE_URL}
      - SUPABASE_SERVICE_TOKEN=${SUPABASE_SERVICE_TOKEN}
      - SCRAPING_BEE_API_KEY=${SCRAPING_BEE_API_KEY}
      - HOST=${HOST:-0.0.0.0}
    depends_on:
      - redis
      - playwright-service
      - api
    networks:
      - backend
  redis:
    image: redis:alpine
    networks:
      - backend
    command: redis-server --bind 0.0.0.0

networks:
  backend:
    driver: bridge

api-1 | Attempted to access Supabase client when it's not configured.
api-1 | Error logging crawl job:
api-1 | Error: Supabase client is not configured.
api-1 | at Proxy. (/app/dist/src/services/supabase.js:38:23)
api-1 | at logCrawl (/app/dist/src/services/logging/crawl_log.js:9:14)
api-1 | at crawlController (/app/dist/src/controllers/crawl.js:72:40)
api-1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@rafaelsideguide
Copy link
Collaborator

I'm not able to reproduce this error. Have you followed the self host guide?

Your .env (same path as docker-compose) file should look like this:

# ===== Required ENVS ======
NUM_WORKERS_PER_QUEUE=8 
PORT=3002
HOST=0.0.0.0
REDIS_URL=redis://redis:6379
PLAYWRIGHT_MICROSERVICE_URL=http://playwright-service:3000

## To turn on DB authentication, you need to set up supabase.
USE_DB_AUTHENTICATION=false

# ===== Optional ENVS ======

# Supabase Setup (used to support DB authentication, advanced logging, etc.)
SUPABASE_ANON_TOKEN= 
SUPABASE_URL= 
SUPABASE_SERVICE_TOKEN=

# Other Optionals
TEST_API_KEY= # use if you've set up authentication and want to test with a real API key
SCRAPING_BEE_API_KEY= #Set if you'd like to use scraping Be to handle JS blocking
OPENAI_API_KEY= # add for LLM dependednt features (image alt generation, etc.)
BULL_AUTH_KEY= #
LOGTAIL_KEY= # Use if you're configuring basic logging with logtail
LLAMAPARSE_API_KEY= #Set if you have a llamaparse key you'd like to use to parse pdfs
SERPER_API_KEY= #Set if you have a serper key you'd like to use as a search api
SLACK_WEBHOOK_URL= # set if you'd like to send slack server health status messages
POSTHOG_API_KEY= # set if you'd like to send posthog events like job logs
POSTHOG_HOST= # set if you'd like to send posthog events like job logs

and the docker-compose.yaml should look like this:

name: firecrawl
version: '3.9'
services:
  playwright-service:
    build: apps/playwright-service
    environment:
      - PORT=3000
    networks:
      - backend
  
  api:
    build: apps/api
    environment:
      - REDIS_URL=${REDIS_URL:-redis://redis:6379}
      - PLAYWRIGHT_MICROSERVICE_URL=${PLAYWRIGHT_MICROSERVICE_URL:-http://playwright-service:3000}
      - USE_DB_AUTHENTICATION=${USE_DB_AUTHENTICATION}
      - PORT=${PORT:-3002}
      - NUM_WORKERS_PER_QUEUE=${NUM_WORKERS_PER_QUEUE}
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - SLACK_WEBHOOK_URL=${SLACK_WEBHOOK_URL}
      - SERPER_API_KEY=${SERPER_API_KEY}
      - LLAMAPARSE_API_KEY=${LLAMAPARSE_API_KEY}
      - LOGTAIL_KEY=${LOGTAIL_KEY}
      - BULL_AUTH_KEY=${BULL_AUTH_KEY}
      - TEST_API_KEY=${TEST_API_KEY}
      - POSTHOG_API_KEY=${POSTHOG_API_KEY}
      - POSTHOG_HOST=${POSTHOG_HOST}
      - SUPABASE_ANON_TOKEN=${SUPABASE_ANON_TOKEN}
      - SUPABASE_URL=${SUPABASE_URL}
      - SUPABASE_SERVICE_TOKEN=${SUPABASE_SERVICE_TOKEN}
      - SCRAPING_BEE_API_KEY=${SCRAPING_BEE_API_KEY}
      - HOST=${HOST:-0.0.0.0}
    depends_on:
      - redis
      - playwright-service
    ports:
      - "3002:3002"
    command: [ "pnpm", "run", "start:production" ]
    networks:
      - backend

  worker:
    build: apps/api
    environment:
      - REDIS_URL=${REDIS_URL:-redis://redis:6379}
      - PLAYWRIGHT_MICROSERVICE_URL=${PLAYWRIGHT_MICROSERVICE_URL:-http://playwright-service:3000}
      - USE_DB_AUTHENTICATION=${USE_DB_AUTHENTICATION}
      - PORT=${PORT:-3002}
      - NUM_WORKERS_PER_QUEUE=${NUM_WORKERS_PER_QUEUE}
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - SLACK_WEBHOOK_URL=${SLACK_WEBHOOK_URL}
      - SERPER_API_KEY=${SERPER_API_KEY}
      - LLAMAPARSE_API_KEY=${LLAMAPARSE_API_KEY}
      - LOGTAIL_KEY=${LOGTAIL_KEY}
      - BULL_AUTH_KEY=${BULL_AUTH_KEY}
      - TEST_API_KEY=${TEST_API_KEY}
      - POSTHOG_API_KEY=${POSTHOG_API_KEY}
      - POSTHOG_HOST=${POSTHOG_HOST}
      - SUPABASE_ANON_TOKEN=${SUPABASE_ANON_TOKEN}
      - SUPABASE_URL=${SUPABASE_URL}
      - SUPABASE_SERVICE_TOKEN=${SUPABASE_SERVICE_TOKEN}
      - SCRAPING_BEE_API_KEY=${SCRAPING_BEE_API_KEY}
      - HOST=${HOST:-0.0.0.0}
    depends_on:
      - redis
      - playwright-service
      - api
    networks:
      - backend
  redis:
    image: redis:alpine
    networks:
      - backend
    command: redis-server --bind 0.0.0.0

networks:
  backend:
    driver: bridge

@rafaelsideguide
Copy link
Collaborator

@panw3i were you able to test the fix I suggested? Any updates?

@nickscamara nickscamara added the question Further information is requested label May 28, 2024
@nickscamara
Copy link
Member

@panw3i Let us know if you were able to fix it.

@rafaelsideguide
Copy link
Collaborator

I'm closing this one.

@rafaelsideguide rafaelsideguide closed this as not planned Won't fix, can't repro, duplicate, stale Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested self-host
Projects
None yet
Development

No branches or pull requests

3 participants