mirror of
https://github.com/AppFlowy-IO/AppFlowy-Cloud.git
synced 2026-03-13 10:09:56 +08:00
* chore: organze deploy.env and dev.env & remove potainer & remove unused env * chore: bump collab * chore: clippy
230 lines
9.9 KiB
Bash
230 lines
9.9 KiB
Bash
# =============================================================================
|
|
# AppFlowy Cloud - Development Environment Configuration
|
|
# =============================================================================
|
|
# This file is used to set the environment variables for local development
|
|
# Copy this file to .env and change the values as needed
|
|
|
|
# =============================================================================
|
|
# 🗄️ DATABASE & CACHE: Core data infrastructure
|
|
# =============================================================================
|
|
|
|
# URL for sqlx
|
|
DATABASE_URL=postgres://postgres:password@localhost:5432/postgres
|
|
# Uncomment this to enable build without database
|
|
# .sqlx files must be pregenerated
|
|
# SQLX_OFFLINE=true
|
|
|
|
# =============================================================================
|
|
# ☁️ APPFLOWY SERVICES: Application service configuration
|
|
# =============================================================================
|
|
|
|
# GoTrue URL that the appflowy service will use to connect to gotrue
|
|
APPFLOWY_GOTRUE_BASE_URL=http://localhost:9999
|
|
APPFLOWY_DATABASE_URL=postgres://postgres:password@localhost:5432/postgres
|
|
APPFLOWY_ACCESS_CONTROL=true
|
|
APPFLOWY_WEBSOCKET_MAILBOX_SIZE=6000
|
|
APPFLOWY_DATABASE_MAX_CONNECTIONS=40
|
|
APPFLOWY_DOCUMENT_CONTENT_SPLIT_LEN=8000
|
|
|
|
# =============================================================================
|
|
# 🔐 GOTRUE: Authentication service configuration
|
|
# =============================================================================
|
|
|
|
# GoTrue Admin Credentials
|
|
# Admin user for accessing the admin panel
|
|
GOTRUE_ADMIN_EMAIL=admin@example.com
|
|
GOTRUE_ADMIN_PASSWORD=password
|
|
|
|
# JWT Configuration
|
|
# Authentication key, change this and keep the key safe and secret
|
|
GOTRUE_JWT_SECRET=hello456
|
|
# Expiration time in seconds for the JWT token
|
|
GOTRUE_JWT_EXP=7200
|
|
|
|
# External URL where the GoTrue service is exposed
|
|
# The email verification link provided to users will redirect them to this specified host
|
|
# For instance, if you're running your application locally using 'docker compose up -d',
|
|
# you can set this value to 'http://localhost'
|
|
API_EXTERNAL_URL=http://localhost:9999
|
|
|
|
# GoTrue Database Connection
|
|
# Database URL that gotrue will use
|
|
GOTRUE_DATABASE_URL=postgres://postgres:password@postgres:5432/postgres?search_path=auth
|
|
|
|
# User Registration & Login Settings
|
|
# User sign up will automatically be confirmed if this is set to true
|
|
# If you have OAuth2 set up or smtp configured, you can set this to false
|
|
# to enforce email confirmation or OAuth2 login instead
|
|
GOTRUE_MAILER_AUTOCONFIRM=false
|
|
# Set this to true if users can only join by invite
|
|
GOTRUE_DISABLE_SIGNUP=false
|
|
|
|
# Email Rate Limiting
|
|
# Number of emails that can be sent per minute
|
|
GOTRUE_RATE_LIMIT_EMAIL_SENT=1000
|
|
|
|
# =============================================================================
|
|
# 📧 EMAIL CONFIGURATION: Optional (only configure if you need email features)
|
|
# =============================================================================
|
|
|
|
# If you enable mail confirmation, you need to set the SMTP configuration below
|
|
# Note that smtps will be used for port 465, otherwise plain smtp with optional STARTTLS
|
|
GOTRUE_SMTP_HOST=smtp.gmail.com
|
|
GOTRUE_SMTP_PORT=465
|
|
GOTRUE_SMTP_USER=email_sender@some_company.com
|
|
GOTRUE_SMTP_PASS=email_sender_password
|
|
GOTRUE_SMTP_ADMIN_EMAIL=comp_admin@some_company.com
|
|
|
|
# Email template URLs for different types of emails
|
|
GOTRUE_MAILER_TEMPLATES_CONFIRMATION=https://raw.githubusercontent.com/AppFlowy-IO/AppFlowy-Cloud/main/assets/mailer_templates/confirmation.html
|
|
GOTRUE_MAILER_TEMPLATES_INVITE=https://raw.githubusercontent.com/AppFlowy-IO/AppFlowy-Cloud/main/assets/mailer_templates/invite.html
|
|
GOTRUE_MAILER_TEMPLATES_RECOVERY=https://raw.githubusercontent.com/AppFlowy-IO/AppFlowy-Cloud/main/assets/mailer_templates/recovery.html
|
|
GOTRUE_MAILER_TEMPLATES_MAGIC_LINK=https://raw.githubusercontent.com/AppFlowy-IO/AppFlowy-Cloud/main/assets/mailer_templates/magic_link.html
|
|
GOTRUE_MAILER_TEMPLATES_EMAIL_CHANGE=https://raw.githubusercontent.com/AppFlowy-IO/AppFlowy-Cloud/main/assets/mailer_templates/email_change.html
|
|
|
|
# AppFlowy Cloud Mailer
|
|
# Note that smtps (TLS) is always required, even for ports other than 465
|
|
APPFLOWY_MAILER_SMTP_HOST=smtp.gmail.com
|
|
APPFLOWY_MAILER_SMTP_USERNAME=notify@appflowy.io
|
|
APPFLOWY_MAILER_SMTP_EMAIL=notify@appflowy.io
|
|
APPFLOWY_MAILER_SMTP_PASSWORD=email_sender_password
|
|
APPFLOWY_MAILER_SMTP_TLS_KIND=wrapper # "none" "wrapper" "required" "opportunistic"
|
|
|
|
# =============================================================================
|
|
# 🔑 OAUTH PROVIDERS: Optional (configure only the ones you want to use)
|
|
# =============================================================================
|
|
|
|
# Google OAuth2
|
|
GOTRUE_EXTERNAL_GOOGLE_ENABLED=true
|
|
GOTRUE_EXTERNAL_GOOGLE_CLIENT_ID=
|
|
GOTRUE_EXTERNAL_GOOGLE_SECRET=
|
|
GOTRUE_EXTERNAL_GOOGLE_REDIRECT_URI=http://localhost:9999/callback
|
|
|
|
# GitHub OAuth2
|
|
GOTRUE_EXTERNAL_GITHUB_ENABLED=false
|
|
GOTRUE_EXTERNAL_GITHUB_CLIENT_ID=
|
|
GOTRUE_EXTERNAL_GITHUB_SECRET=
|
|
GOTRUE_EXTERNAL_GITHUB_REDIRECT_URI=http://localhost:9999/callback
|
|
|
|
# Discord OAuth2
|
|
GOTRUE_EXTERNAL_DISCORD_ENABLED=false
|
|
GOTRUE_EXTERNAL_DISCORD_CLIENT_ID=
|
|
GOTRUE_EXTERNAL_DISCORD_SECRET=
|
|
GOTRUE_EXTERNAL_DISCORD_REDIRECT_URI=http://localhost:9999/callback
|
|
|
|
# Apple OAuth2
|
|
GOTRUE_EXTERNAL_APPLE_ENABLED=false
|
|
GOTRUE_EXTERNAL_APPLE_CLIENT_ID=
|
|
GOTRUE_EXTERNAL_APPLE_SECRET=
|
|
GOTRUE_EXTERNAL_APPLE_REDIRECT_URI=http://localhost:9999/callback
|
|
|
|
# =============================================================================
|
|
# 🏗️ INFRASTRUCTURE SERVICES: Object storage and networking
|
|
# =============================================================================
|
|
|
|
# AWS credentials (used for MinIO in development)
|
|
AWS_ACCESS_KEY=minioadmin
|
|
AWS_SECRET=minioadmin
|
|
|
|
# =============================================================================
|
|
# 🎛️ ADMIN FRONTEND: Management interface configuration
|
|
# =============================================================================
|
|
|
|
# URL that connects to redis for admin frontend
|
|
ADMIN_FRONTEND_REDIS_URL=redis://localhost:6379
|
|
# URL that connects to gotrue service for admin frontend
|
|
ADMIN_FRONTEND_GOTRUE_URL=http://localhost:9999
|
|
# URL that connects to the appflowy cloud service for admin frontend
|
|
ADMIN_FRONTEND_APPFLOWY_CLOUD_URL=http://localhost:8000
|
|
# Base URL path for the admin frontend (usually /console for production, can be empty for development)
|
|
ADMIN_FRONTEND_PATH_PREFIX=
|
|
|
|
# =============================================================================
|
|
# 💾 FILE STORAGE: Local MinIO (works out-of-the-box for development)
|
|
# =============================================================================
|
|
|
|
# File Storage
|
|
APPFLOWY_S3_CREATE_BUCKET=true
|
|
APPFLOWY_S3_USE_MINIO=true
|
|
APPFLOWY_S3_MINIO_URL="http://localhost:9000 # change this if you are using a different address for minio"
|
|
APPFLOWY_S3_ACCESS_KEY=${AWS_ACCESS_KEY}
|
|
APPFLOWY_S3_SECRET_KEY=${AWS_SECRET}
|
|
APPFLOWY_S3_BUCKET=appflowy
|
|
# APPFLOWY_S3_REGION=us-east-1
|
|
|
|
# =============================================================================
|
|
# 🤖 AI FEATURES: Optional (configure only if you want AI functionality)
|
|
# =============================================================================
|
|
|
|
# AppFlowy AI
|
|
# Standard OpenAI API:
|
|
# Set your API key here if you are using the standard OpenAI API.
|
|
AI_OPENAI_API_KEY=
|
|
# If no summary model is provided, there will be no search summary when using AI search.
|
|
AI_OPENAI_API_SUMMARY_MODEL="gpt-4o-mini"
|
|
|
|
# Azure-hosted OpenAI API:
|
|
# If you're using a self-hosted OpenAI API via Azure, leave AI_OPENAI_API_KEY empty
|
|
# and set the following Azure-specific variables instead. If both are set, the standard OpenAI API will be used.
|
|
AI_AZURE_OPENAI_API_KEY=
|
|
AI_AZURE_OPENAI_API_BASE=
|
|
AI_AZURE_OPENAI_API_VERSION=
|
|
|
|
AI_SERVER_PORT=5001
|
|
AI_SERVER_HOST=localhost
|
|
AI_DATABASE_URL=postgresql+psycopg://postgres:password@localhost:5432/postgres
|
|
AI_REDIS_URL=redis://localhost:6379
|
|
AI_APPFLOWY_BUCKET_NAME=${APPFLOWY_S3_BUCKET}
|
|
AI_APPFLOWY_HOST=http://localhost:8000
|
|
AI_MINIO_URL=http://localhost:9000
|
|
|
|
# Embedding Configuration
|
|
APPFLOWY_EMBEDDING_CHUNK_SIZE=500
|
|
APPFLOWY_EMBEDDING_CHUNK_OVERLAP=50
|
|
|
|
# =============================================================================
|
|
# ⚙️ WORKER SERVICES: Background processing (good defaults for development)
|
|
# =============================================================================
|
|
|
|
# AppFlowy Indexer (for search functionality)
|
|
APPFLOWY_INDEXER_ENABLED=true
|
|
APPFLOWY_INDEXER_DATABASE_URL=postgres://postgres:password@localhost:5432/postgres
|
|
APPFLOWY_INDEXER_REDIS_URL=redis://localhost:6379
|
|
APPFLOWY_INDEXER_EMBEDDING_BUFFER_SIZE=5000
|
|
|
|
# AppFlowy Worker
|
|
APPFLOWY_WORKER_REDIS_URL=redis://localhost:6379
|
|
APPFLOWY_WORKER_DATABASE_URL=postgres://postgres:password@localhost:5432/postgres
|
|
|
|
# =============================================================================
|
|
# 🌐 WEB FRONTEND: AppFlowy Web interface
|
|
# =============================================================================
|
|
|
|
# AppFlowy Web
|
|
APPFLOWY_WEB_URL=http://localhost:3000
|
|
|
|
# =============================================================================
|
|
# 🗄️ PGADMIN: Database Management Web Interface
|
|
# =============================================================================
|
|
|
|
# PgAdmin credentials for database management web UI
|
|
# You can access pgadmin at http://localhost/pgadmin when running with docker-compose
|
|
# Use the DATABASE_URL values when connecting to the database
|
|
PGADMIN_DEFAULT_EMAIL=admin@example.com
|
|
PGADMIN_DEFAULT_PASSWORD=password
|
|
|
|
# =============================================================================
|
|
# 🛠️ DEVELOPMENT TOOLS: Database admin, monitoring, etc.
|
|
# =============================================================================
|
|
|
|
# Log level for the application
|
|
RUST_LOG=info
|
|
|
|
# Cloudflare tunnel token
|
|
CLOUDFLARE_TUNNEL_TOKEN=
|
|
|
|
# Enable AI tests in development/CI environment
|
|
# In GitHub CI, this is enabled via the 'ai-test-enabled' feature flag
|
|
# Set to true to run AI-related tests locally (requires valid API keys)
|
|
AI_TEST_ENABLED=false
|