# ============================================================================= # Sentry Self-Hosted 环境变量配置 # ============================================================================= # 使用方法: 复制为 .env 并修改以下配置 # cp .env.example .env # ============================================================================= # ----------------------------------------------------------------------------- # 必须配置 - 安全相关 # ----------------------------------------------------------------------------- # Sentry 密钥 (至少 50 个随机字符) # 生成方法: openssl rand -hex 32 SENTRY_SECRET_KEY=please_change_this_to_a_random_string_at_least_50_chars # PostgreSQL 数据库密码 SENTRY_DB_PASSWORD=sentry_secret_password # ----------------------------------------------------------------------------- # 端口配置 # ----------------------------------------------------------------------------- # Sentry Web UI 端口 SENTRY_PORT=9000 # Relay 端口 (SDK 数据接收) SENTRY_RELAY_PORT=3000 # ----------------------------------------------------------------------------- # 邮件配置 (可选,用于告警通知) # ----------------------------------------------------------------------------- # SMTP 服务器 SENTRY_EMAIL_HOST=smtp.example.com SENTRY_EMAIL_PORT=587 SENTRY_EMAIL_USER= SENTRY_EMAIL_PASSWORD= SENTRY_EMAIL_USE_TLS=true # 发件人地址 SENTRY_SERVER_EMAIL=sentry@example.com # ----------------------------------------------------------------------------- # 系统配置 # ----------------------------------------------------------------------------- # 系统 URL (用于邮件链接等) SENTRY_SYSTEM_URL=http://localhost:9000