feat: 添加环境变量配置支持

添加.env.example文件并更新Dockerfile和index.js以支持通过环境变量配置API基础路径和缓存目录
This commit is contained in:
2026-01-08 11:51:06 +08:00
parent ea22b11610
commit 755f8d45c3
3 changed files with 7 additions and 2 deletions

View File

@@ -26,6 +26,8 @@ COPY . .
# 3. 权限与启动
ENV PORT=9520
ENV CACHE_DIR=/app/.cache
ENV API_BASE=http://127.0.0.1:9558/api
VOLUME ["/app/.cache"]
RUN useradd -m appuser && \
mkdir -p "$CACHE_DIR" && \