mirror of https://github.com/buster-so/buster.git
dev mode and env example update
This commit is contained in:
parent
46cb2c3b3b
commit
6bdd3d74d2
144
.env.example
144
.env.example
|
@ -1,129 +1,25 @@
|
||||||
# General Application Settings
|
# API VARS
|
||||||
ENVIRONMENT="development"
|
ENVIRONMENT="development"
|
||||||
|
DATABASE_URL="postgresql://postgres:postgres@127.0.0.1:54322/postgres"
|
||||||
|
POOLER_URL="postgresql://postgres:postgres@127.0.0.1:54322/postgres"
|
||||||
|
JWT_SECRET="super-secret-jwt-token-with-at-least-32-characters-long"
|
||||||
|
REDIS_URL="redis://localhost:6379"
|
||||||
BUSTER_URL="http://localhost:3000"
|
BUSTER_URL="http://localhost:3000"
|
||||||
BUSTER_WH_TOKEN="buster-wh-token"
|
BUSTER_WH_TOKEN="buster-wh-token"
|
||||||
|
LOG_LEVEL="debug"
|
||||||
|
SUPABASE_URL="http://localhost:54321"
|
||||||
|
SUPABASE_SERVICE_ROLE_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU"
|
||||||
|
|
||||||
# --- API Service Specific ---
|
# AI VARS
|
||||||
# Direct Database Connection (for API service and potentially others)
|
RERANK_API_KEY="your_rerank_api_key"
|
||||||
DATABASE_URL="postgresql://postgres.your-tenant-id:your-super-secret-and-long-postgres-password@supavisor:5432/postgres"
|
RERANK_MODEL="rerank-v3.5"
|
||||||
# Pooled Database Connection (for API service, uses Supavisor)
|
RERANK_BASE_URL="https://api.cohere.com/v2/rerank"
|
||||||
POOLER_URL="postgresql://postgres.your-tenant-id:your-super-secret-and-long-postgres-password@supavisor:5432/postgres"
|
LLM_API_KEY="your_llm_api_key"
|
||||||
# Redis Connection
|
LLM_BASE_URL="http://localhost:4000"
|
||||||
REDIS_URL="redis://buster-redis:6379"
|
|
||||||
# Supabase Connection for API service
|
|
||||||
SUPABASE_URL="http://kong:8000"
|
|
||||||
SUPABASE_SERVICE_ROLE_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ey AgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q"
|
|
||||||
|
|
||||||
# --- LLM / AI Services ---
|
# WEB VARS
|
||||||
EMBEDDING_PROVIDER="ollama"
|
NEXT_PUBLIC_API_URL="http://127.0.0.1:3001"
|
||||||
EMBEDDING_MODEL="mxbai-embed-large"
|
NEXT_PUBLIC_URL="http://localhost:3000"
|
||||||
COHERE_API_KEY=""
|
NEXT_PUBLIC_SUPABASE_URL="http://127.0.0.1:54321"
|
||||||
OPENAI_API_KEY="" # For OpenAI models or Supabase Studio assistant
|
NEXT_PUBLIC_SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0"
|
||||||
LLM_API_KEY="test-key"
|
NEXT_PUBLIC_WEB_SOCKET_URL="ws://127.0.0.1:3001"
|
||||||
LLM_BASE_URL="http://litellm:4001"
|
|
||||||
|
|
||||||
# --- Web Client (Next.js) Specific ---
|
|
||||||
NEXT_PUBLIC_API_URL="http://localhost:3001" # External URL for the API service (buster-api)
|
|
||||||
NEXT_PUBLIC_URL="http://localhost:3000" # External URL for the Web service (buster-web)
|
|
||||||
NEXT_PUBLIC_SUPABASE_URL="http://kong:8000" # External URL for Supabase (Kong proxy)
|
|
||||||
NEXT_PUBLIC_WS_URL="ws://localhost:3001"
|
|
||||||
NEXT_PUBLIC_SUPABASE_ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ey AgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE"
|
|
||||||
NEXT_PRIVATE_SUPABASE_SERVICE_ROLE_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ey AgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q"
|
|
||||||
|
|
||||||
#################################################
|
|
||||||
# Supabase Stack Configuration Variables
|
|
||||||
# These are primarily used by the Supabase services themselves
|
|
||||||
# (defined in supabase/docker-compose.yml)
|
|
||||||
# and are sourced from this .env file when `docker compose up` is run.
|
|
||||||
#################################################
|
|
||||||
|
|
||||||
############
|
|
||||||
# Secrets
|
|
||||||
############
|
|
||||||
POSTGRES_PASSWORD="your-super-secret-and-long-postgres-password"
|
|
||||||
JWT_SECRET="your-super-secret-jwt-token-with-at-least-32-characters-long"
|
|
||||||
ANON_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ey AgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE"
|
|
||||||
SERVICE_ROLE_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ey AgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q"
|
|
||||||
DASHBOARD_USERNAME="supabase"
|
|
||||||
DASHBOARD_PASSWORD="this_password_is_insecure_and_should_be_updated"
|
|
||||||
|
|
||||||
############
|
|
||||||
# Database
|
|
||||||
############
|
|
||||||
POSTGRES_HOST="db"
|
|
||||||
POSTGRES_DB="postgres"
|
|
||||||
POSTGRES_PORT="5432"
|
|
||||||
|
|
||||||
############
|
|
||||||
# Supavisor -- Database pooler
|
|
||||||
############
|
|
||||||
POOLER_PROXY_PORT_TRANSACTION="6543"
|
|
||||||
POOLER_DEFAULT_POOL_SIZE="20"
|
|
||||||
POOLER_MAX_CLIENT_CONN="100"
|
|
||||||
POOLER_TENANT_ID="your-tenant-id"
|
|
||||||
|
|
||||||
############
|
|
||||||
# API Proxy - Kong
|
|
||||||
############
|
|
||||||
KONG_HTTP_PORT="8000"
|
|
||||||
KONG_HTTPS_PORT="8443"
|
|
||||||
|
|
||||||
############
|
|
||||||
# API - PostgREST
|
|
||||||
############
|
|
||||||
PGRST_DB_SCHEMAS="public,storage,graphql_public"
|
|
||||||
|
|
||||||
############
|
|
||||||
# Auth - GoTrue
|
|
||||||
############
|
|
||||||
SITE_URL="http://localhost:3000" # Default base URL for the site (used in emails, etc.)
|
|
||||||
ADDITIONAL_REDIRECT_URLS=""
|
|
||||||
JWT_EXPIRY="3600"
|
|
||||||
DISABLE_SIGNUP="false"
|
|
||||||
API_EXTERNAL_URL="http://localhost:8000" # Publicly accessible URL for the Supabase API (via Kong)
|
|
||||||
|
|
||||||
## Mailer Config
|
|
||||||
MAILER_URLPATHS_CONFIRMATION="/auth/v1/verify"
|
|
||||||
MAILER_URLPATHS_INVITE="/auth/v1/verify"
|
|
||||||
MAILER_URLPATHS_RECOVERY="/auth/v1/verify"
|
|
||||||
MAILER_URLPATHS_EMAIL_CHANGE="/auth/v1/verify"
|
|
||||||
|
|
||||||
## Email auth
|
|
||||||
ENABLE_EMAIL_SIGNUP="true"
|
|
||||||
ENABLE_EMAIL_AUTOCONFIRM="false"
|
|
||||||
SMTP_ADMIN_EMAIL="admin@buster.so"
|
|
||||||
SMTP_HOST="supabase-mail"
|
|
||||||
SMTP_PORT="2500"
|
|
||||||
SMTP_USER=""
|
|
||||||
SMTP_PASS=""
|
|
||||||
SMTP_SENDER_NAME="Buster"
|
|
||||||
ENABLE_ANONYMOUS_USERS="true"
|
|
||||||
|
|
||||||
## Phone auth
|
|
||||||
ENABLE_PHONE_SIGNUP="true"
|
|
||||||
ENABLE_PHONE_AUTOCONFIRM="true"
|
|
||||||
|
|
||||||
############
|
|
||||||
# Studio - Supabase Dashboard
|
|
||||||
############
|
|
||||||
STUDIO_DEFAULT_ORGANIZATION="Default Organization"
|
|
||||||
STUDIO_DEFAULT_PROJECT="Default Project"
|
|
||||||
STUDIO_PORT="3003"
|
|
||||||
SUPABASE_PUBLIC_URL="http://localhost:8000" # Public URL for Supabase (Kong), used by Studio
|
|
||||||
|
|
||||||
# Image Proxy
|
|
||||||
IMGPROXY_ENABLE_WEBP_DETECTION="true"
|
|
||||||
|
|
||||||
############
|
|
||||||
# Functions - Supabase Edge Functions
|
|
||||||
############
|
|
||||||
FUNCTIONS_VERIFY_JWT="false"
|
|
||||||
|
|
||||||
############
|
|
||||||
# Logs - Logflare
|
|
||||||
############
|
|
||||||
LOGFLARE_LOGGER_BACKEND_API_KEY="your-super-secret-and-long-logflare-key"
|
|
||||||
LOGFLARE_API_KEY="your-super-secret-and-long-logflare-key"
|
|
||||||
DOCKER_SOCKET_LOCATION="/var/run/docker.sock"
|
|
||||||
GOOGLE_PROJECT_ID="GOOGLE_PROJECT_ID"
|
|
||||||
GOOGLE_PROJECT_NUMBER="GOOGLE_PROJECT_NUMBER"
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
# Makefile (root)
|
||||||
|
|
||||||
|
.PHONY: dev api-dev-fg web-dev-fg stop
|
||||||
|
|
||||||
|
# Main development target: runs both API and Web dev servers in parallel.
|
||||||
|
# They will run until Ctrl+C is pressed.
|
||||||
|
dev:
|
||||||
|
@echo "Starting API and Web development servers..."
|
||||||
|
@echo "Press Ctrl+C to stop all."
|
||||||
|
# Start API dev server in the background
|
||||||
|
# The subshell ( ... ) ensures that 'cd' doesn't affect subsequent commands at this level.
|
||||||
|
(cd api && $(MAKE) dev) & \
|
||||||
|
# Start Web dev server in the background
|
||||||
|
(cd web && $(MAKE) dev) & \
|
||||||
|
# Wait for all background jobs of this shell to complete.
|
||||||
|
# Since dev servers run indefinitely, this 'wait' will also run indefinitely until interrupted (Ctrl+C).
|
||||||
|
wait
|
||||||
|
@echo "Development servers stopped or shell command finished."
|
||||||
|
|
||||||
|
# Target to stop API-specific services (like Docker containers, Supabase).
|
||||||
|
# The web dev server (npm run dev) is expected to be stopped when 'make dev' is interrupted (Ctrl+C).
|
||||||
|
stop:
|
||||||
|
@echo "Stopping API services (Redis, Supabase)..."
|
||||||
|
$(MAKE) -C api stop
|
||||||
|
@echo "API services stopped. If 'make dev' was running, web server should also be stopped."
|
||||||
|
|
||||||
|
# Individual targets if you want to run them separately (e.g., in different terminal tabs)
|
||||||
|
# These are foreground targets.
|
||||||
|
api-dev-fg:
|
||||||
|
@echo "Starting API development server (foreground)..."
|
||||||
|
cd api && $(MAKE) dev
|
||||||
|
|
||||||
|
web-dev-fg:
|
||||||
|
@echo "Starting Web development server (foreground)..."
|
||||||
|
cd web && $(MAKE) dev
|
10
api/makefile
10
api/makefile
|
@ -1,5 +1,5 @@
|
||||||
dev:
|
dev:
|
||||||
cd .. && docker compose up -d redis && cd api && \
|
cd .. && docker run -d --name buster-redis-make -p 6379:6379 -v buster_redis_data:/data redis && cd api && \
|
||||||
supabase start
|
supabase start
|
||||||
supabase db reset
|
supabase db reset
|
||||||
export DATABASE_URL=postgres://postgres:postgres@127.0.0.1:54322/postgres && \
|
export DATABASE_URL=postgres://postgres:postgres@127.0.0.1:54322/postgres && \
|
||||||
|
@ -21,12 +21,12 @@ update-seed:
|
||||||
> libs/database/seed.sql
|
> libs/database/seed.sql
|
||||||
|
|
||||||
stop:
|
stop:
|
||||||
docker compose down && \
|
docker stop buster-redis-make || true && \
|
||||||
supabase stop && \
|
docker rm buster-redis-make || true && \
|
||||||
pkill ollama
|
cd .. && docker compose down && supabase stop
|
||||||
|
|
||||||
fast:
|
fast:
|
||||||
cd .. && docker compose up -d redis && cd api && \
|
cd .. && docker run -d --name buster-redis-make -p 6379:6379 -v buster_redis_data:/data redis && cd api && \
|
||||||
export RUST_LOG=debug && \
|
export RUST_LOG=debug && \
|
||||||
export CARGO_INCREMENTAL=1 && \
|
export CARGO_INCREMENTAL=1 && \
|
||||||
nice cargo watch -C server -x run
|
nice cargo watch -C server -x run
|
Loading…
Reference in New Issue