Skip to content

Deployment Guide

Prerequisites

  • Docker and Docker Compose
  • Domain with SSL certificate
  • Supabase account
  • OpenAI API key

Environment Variables

Create .env file:

bash
# Supabase
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_KEY=your-service-key

# OpenAI
OPENAI_API_KEY=your-openai-key

# Redis
REDIS_URL=redis://localhost:6379/0

Docker Deployment

yaml
# docker-compose.yml
version: '3.8'

services:
  api:
    build: ./backend
    ports:
      - "8000:8000"
    env_file:
      - .env
    depends_on:
      - redis

  worker:
    build: ./backend
    command: celery -A app.worker worker
    env_file:
      - .env
    depends_on:
      - redis

  redis:
    image: redis:7-alpine
    volumes:
      - redis_data:/data

volumes:
  redis_data:

Launch

bash
docker-compose up -d

Verify

bash
curl http://localhost:8000/health
# {"status": "healthy"}

Released under the MIT License.