添加chat gemini、chatfire端点、 图片生成 gemini、chatfire 更轻松的AI配置

This commit is contained in:
Connor
2026-01-14 02:25:41 +08:00
parent 4d38357ff6
commit 23b45efae9
22 changed files with 1512 additions and 405 deletions

View File

@@ -3,6 +3,9 @@
# ==================== 阶段1: 构建前端 ====================
FROM node:20-alpine AS frontend-builder
# 配置 npm 镜像源(国内加速)
RUN npm config set registry https://registry.npmmirror.com
WORKDIR /app/web
# 复制前端依赖文件
@@ -59,15 +62,12 @@ RUN apk add --no-cache \
tzdata \
ffmpeg \
sqlite-libs \
wget \
&& rm -rf /var/cache/apk/*
# 设置时区
ENV TZ=Asia/Shanghai
# 创建非 root 用户
RUN addgroup -g 1000 app && \
adduser -D -u 1000 -G app app
WORKDIR /app
# 从构建阶段复制可执行文件
@@ -83,10 +83,7 @@ RUN cp ./configs/config.example.yaml ./configs/config.yaml
# 复制数据库迁移文件
COPY migrations ./migrations/
# 切换到非 root 用户
USER app
# 创建数据目录(在 app 用户下创建,确保权限正确)
# 创建数据目录root 用户运行,无需权限设置)
RUN mkdir -p /app/data/storage
# 暴露端口