Files
momentry_studio/.env.template
Momentry Studio 313d42be2f fix: 设置默认账号为 demo/demo123,修复数据路径
问题修复:
1. ✅ 默认账号设置
   - db.rs: 默认密码改为 demo123
   - .env.template: 默认密码改为 demo123
   - install.sh: 默认密码改为 demo123

2. ✅ 数据路径动态化
   - db.rs: 使用 dirs::home_dir() 自动检测用户主目录
   - 默认路径: {HOME}/momentry_studio/data/users
   - 支持通过 MOMENTRY_DATA_DIR 环境变量自定义

验证脚本:
- scripts/verify_default_setup.sh: 验证默认账号和数据路径

目标:
- 安装后可直接使用 demo/demo123 登录
- 数据路径随用户主目录自动调整
- 适用于任何用户环境

影响:
- demo 用户: 密码固定为 demo123
- 数据路径: 自动检测 {HOME}/momentry_studio/data/users
- 安装即可使用,无需额外配置
2026-10-12 15:35:22 +08:00

123 lines
3.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Momentry Studio - 环境变量模板
# 复制此文件为 .env 并根据实际环境修改
# ========================================
# 用户主目录(自动检测,通常不需要设置)
# ========================================
# HOME=/Users/your_username
# ========================================
# 项目根目录
# ========================================
# 默认: $HOME/momentry_core
MOMENTRY_CORE_ROOT=${HOME}/momentry_core
# 默认: $HOME/markbase
MARKBASE_ROOT=${HOME}/markbase
# 默认: $HOME/momentry_studio
MOMENTRY_STUDIO_ROOT=${HOME}/momentry_studio
# 默认: $HOME/momentry
MOMENTRY_ROOT=${HOME}/momentry
# 默认: $HOME/MarkBaseEngine
MARKBASE_ENGINE_ROOT=${HOME}/MarkBaseEngine
# ========================================
# 存储路径
# ========================================
# 默认: $HOME/momentry/var/sftpgo/data
STORAGE_ROOT=${HOME}/momentry/var/sftpgo/data
# 默认: $HOME/momentry/output
OUTPUT_DIR=${HOME}/momentry/output
# 默认: $HOME/momentry/backup
BACKUP_DIR=${HOME}/momentry/backup
# ========================================
# 数据库
# ========================================
# SQLite 数据库目录
MOMENTRY_DATA_DIR=${HOME}/momentry_studio/data/users
# PostgreSQL 连接字符串
DATABASE_URL=postgres://$(whoami)@localhost:5432/momentry
# Qdrant
QDRANT_URL=http://localhost:6333
QDRANT_API_KEY=your_qdrant_api_key_here
# Redis (可选)
REDIS_URL=redis://localhost:6379
# ========================================
# API Keys
# ========================================
# Momentry Core API Key
MOMENTRY_API_KEY=your_momentry_api_key_here
# ========================================
# 默认用户密码
# ========================================
# 默认密码: demo123
# 可自定义修改
MOMENTRY_DEFAULT_PASSWORD=demo123
# ========================================
# SMB 共享配置
# ========================================
# SMB 用户名(默认: demo)
SMB_USER=demo
# SMB 密码(默认使用 MOMENTRY_DEFAULT_PASSWORD)
SMB_PASSWORD=${MOMENTRY_DEFAULT_PASSWORD}
# ========================================
# 工具路径
# ========================================
# Python (用于脚本)
PYTHON_PATH=/opt/homebrew/bin/python3.11
# FFmpeg (用于视频处理)
FFMPEG_PATH=/opt/homebrew/bin/ffmpeg
# ========================================
# 服务配置
# ========================================
# Core API 端口
MOMENTRY_SERVER_PORT=3002
# Studio Proxy 端口
STUDIO_PROXY_PORT=8888
# MarkBase 端口
MARKBASE_PORT=11438
# ========================================
# LLM 服务
# ========================================
# VLM Vision API
MOMENTRY_LLM_VISION_URL=http://localhost:8080/v1/chat/completions
# LLM Chat API
MOMENTRY_LLM_CHAT_URL=http://localhost:8080/v1/chat/completions
# ========================================
# 外部服务 URL
# ========================================
# Media Base URL
MEDIA_BASE_URL=https://wp.momentry.ddns.net
# Serve Base URL
SERVE_BASE_URL=https://m5wp.momentry.ddns.net/files
# ========================================
# 说明
# ========================================
# 1. 复制此文件: cp .env.template .env
# 2. 编辑 .env 文件,填入实际值
# 3. 加载环境变量: source .env
# 4. 运行配置生成: ./generate_config.sh
# 5. 启动服务: npm run proxy