Files
lobehub/.env.example.development
YuTengjing 7ba15cceba ♻️ refactor(docker-compose): restructure dev environment (#12132)
* 🔥 chore(docker-compose): remove Casdoor SSO dependency

Casdoor is no longer needed since BetterAuth now supports email/password registration natively.

LOBE-3907

* ♻️ refactor(docker-compose): restructure directories

- Rename local/ to dev/ for development dependencies
- Remove logto/ and zitadel/ from production/
- Restore Casdoor config in production/grafana/
- Simplify dev/ to core services only (postgresql, redis, rustfs, searxng)
- Update docker-compose.development.yml to use dev/
- Remove minio-bucket.config.json (switched to rustfs)

* ♻️ refactor(docker-compose): simplify dev environment setup

- Remove docker-compose.development.yml, use dev/docker-compose.yml directly
- Add npm scripts: dev:docker, dev:docker:down, dev:docker:reset
- Simplify .env.example.development (remove variable refs, redundant vars)
- Update docker-compose/dev/.env.example (consistent passwords)
- Add docker-compose/dev/data/ to .gitignore
- Update setup docs: use npm scripts, remove image generation section

* 🔧 chore: add SSRF_ALLOW_PRIVATE_IP_ADDRESS to dev env example

* 🔒 security: auto-generate KEY_VAULTS_SECRET and AUTH_SECRET in setup.sh

- Remove hardcoded secrets from docker-compose.yml
- Add placeholders to .env.example files
- Generate secrets dynamically in setup.sh using openssl rand -base64 32

* 🔧 chore(docker-compose): expose SearXNG port and improve dev scripts

- Add SearXNG port mapping (8180:8080) for host access
- Use --wait flag in dev:docker to ensure services are healthy
- Include db:migrate in dev:docker:reset for one-command reset
- Update MinIO reference to RustFS in zh-CN docs
- Add SearXNG to service URLs and port conflict docs
2026-02-06 12:21:30 +08:00

49 lines
1.3 KiB
Plaintext

# LobeChat Development Environment Configuration
# ⚠️ DO NOT USE THESE VALUES IN PRODUCTION!
# Application
APP_URL=http://localhost:3010
# Allow access to private IP addresses (localhost services) in development
# https://lobehub.com/docs/self-hosting/environment-variables/basic#ssrf-allow-private-ip-address
SSRF_ALLOW_PRIVATE_IP_ADDRESS=1
# Secrets (pre-generated for development only)
KEY_VAULTS_SECRET=ww+0igxjGRAAR/eTNFQ55VmhQB5KE5trFZseuntThJs=
AUTH_SECRET=ww+0igxjGRAAR/eTNFQ55VmhQB5KE5trFZseuntThJs=
# Database (PostgreSQL)
DATABASE_URL=postgresql://postgres:change_this_password_on_production@localhost:5432/lobechat
DATABASE_DRIVER=node
# Redis
REDIS_URL=redis://localhost:6379
REDIS_PREFIX=lobechat
REDIS_TLS=0
# S3 Storage (RustFS)
S3_ACCESS_KEY_ID=admin
S3_SECRET_ACCESS_KEY=change_this_password_on_production
S3_ENDPOINT=http://localhost:9000
S3_BUCKET=lobe
S3_ENABLE_PATH_STYLE=1
S3_SET_ACL=0
# LLM vision uses base64 to avoid S3 presigned URL issues in development
LLM_VISION_IMAGE_USE_BASE64=1
# Search (SearXNG)
SEARXNG_URL=http://localhost:8180
# Proxy (Optional)
# HTTP_PROXY=http://localhost:7890
# HTTPS_PROXY=http://localhost:7890
# AI Model API Keys (Required for chat functionality)
# ANTHROPIC_API_KEY=sk-ant-xxx
# ANTHROPIC_PROXY_URL=https://api.anthropic.com
# OPENAI_API_KEY=sk-xxx
# OPENAI_PROXY_URL=https://api.openai.com/v1