convertor/api-server/.env.api.example

73 lines
2.6 KiB
Text
Raw 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.

# ==============================================================================
# ConvertX-CN API Server 環境變數設定
# ==============================================================================
#
# 📌 使用方式:
# 1. 複製此檔案到專案根目錄:
# cp api-server/.env.api.example .env.api
#
# 2. 修改設定值(特別是 JWT_SECRET
#
# 3. 啟動 API Server
# docker compose --profile api up -d
#
# ⚠️ 此檔案僅供 API Server 使用Web UI 不會讀取這些設定
#
# ==============================================================================
# ==============================================================================
# 伺服器設定
# ==============================================================================
# API 監聽地址
API_HOST=0.0.0.0
# API 監聽埠
API_PORT=3001
# ==============================================================================
# JWT 認證設定(🔐 必須修改)
# ==============================================================================
#
# JWT 密鑰用於驗證 API 請求的 Bearer Token
#
# ⚠️ 重要:
# - 必須與產生 Token 的認證服務使用相同的密鑰
# - 請使用長度至少 32 字元的隨機字串
# - 可用 openssl rand -hex 32 產生
#
API_JWT_SECRET=請改成你自己的長隨機字串-至少32個字元-不要用這個預設值
# ==============================================================================
# 檔案儲存設定
# ==============================================================================
# 上傳檔案儲存目錄
# 容器內路徑,會映射到 ./data/api-uploads
UPLOAD_DIR=/app/data/api-uploads
# 轉換結果儲存目錄
# 容器內路徑,會映射到 ./data/api-output
OUTPUT_DIR=/app/data/api-output
# 最大上傳檔案大小bytes
# 預設 100MB = 104857600
MAX_FILE_SIZE=104857600
# ==============================================================================
# 日誌設定
# ==============================================================================
# Rust 日誌級別
# 可用值: error, warn, info, debug, trace
# 格式: module=level,module=level
RUST_LOG=convertx_api=info,tower_http=info
# ==============================================================================
# 進階設定(可選)
# ==============================================================================
# JWT Token 過期時間參考(秒)
# 注意API Server 只驗證 Token不產生 Token
# 這個值僅供參考,實際過期時間由 Token 本身的 exp 欄位決定
# JWT_EXPIRATION_SECS=86400