ghp / .env.example
QSLY's picture
deploy: build Hugging Face Space from source
00a912e
Raw
History Blame Contribute Delete
1.98 kB
# =============================================================================
# Music Together 服务端配置
# 复制此文件为 .env 并填写需要的值
# =============================================================================
#
# 所有变量都有合理默认值。
# Docker 同域部署时无需配置任何环境变量(前端由 Express 托管,自动同源)。
# 本地开发时也无需配置(CORS 自动放行所有来源)。
#
# 服务端端口(默认 3001)
# PORT=3001
# 客户端 URL(可选,用于 CORS 严格白名单模式)
# - 不设置:自动模式,允许所有来源访问(适用于单镜像部署、局域网、公网反代)
# - 设置为具体域名:严格白名单模式(适用于前后端分离跨域部署)
# CLIENT_URL=https://music.example.com
# 额外的 CORS origins(逗号分隔,可选)
# CORS_ORIGINS=https://other-domain.com,https://another.com
# Identity cookie policy. Defaults are suitable for normal same-origin deployments.
# For embedded Hugging Face Spaces, use the following values:
# IDENTITY_COOKIE_SAME_SITE=none
# IDENTITY_COOKIE_PARTITIONED=true
# Log level: debug | info | warn | error (default: info)
# LOG_LEVEL=info
# Log output: pretty (default, readable single-line output) | json
# Use json only when logs are collected by a structured logging platform.
# LOG_FORMAT=pretty
# QQ 音乐单曲搜索 API(仅用于 QQ 音乐的歌曲搜索;未配置时回退到 QQ 原生搜索)
# URL 可填写 Master 根地址或完整的 /api 地址
# QQ_MUSIC_API_URL=http://localhost:9000
# QQ_MUSIC_API_KEY=ag_xxxxxxxxxxxxxxxxxxxxxxxx
# SQLite database path. Keep this under /app/data in Docker and mount that directory.
# DATABASE_URL=file:./data/music-together.db
# 服务器管理员账号 ID,多个 ID 使用英文逗号分隔。
# 先在网页中为账号设置密码,再复制账号 ID 填到这里并重启服务器。
# SERVER_ADMIN_IDS=account-id-1,account-id-2