Spaces:
Sleeping
Sleeping
File size: 892 Bytes
02dd452 e412435 02dd452 e412435 02dd452 e412435 02dd452 e412435 02dd452 e412435 02dd452 0cdaa1b e412435 02dd452 e412435 66947db 02dd452 66947db e412435 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | # 使用官方 Deno alpine 镜像
FROM denoland/deno:alpine-2.4.3
# 安装 git (alpine 使用 apk)
RUN apk add --no-cache git
# 克隆仓库并清理.git目录
RUN git clone https://github.com/eraycc/Openai-API-Message-Audit-Proxy.git /app \
&& rm -rf /app/.git
# 设置工作目录
WORKDIR /app
# 缓存依赖 (提前执行以减少构建时间)
RUN deno cache main.ts
# 暴露端口 (与代码中Deno.serve()一致)
EXPOSE 8000
# 设置环境变量 (可根据需要覆盖)
ENV API_SITES='[{"path":"coaipro","baseurl":"https://api.coaipro.me","ratelimit":40,"msg-audit-config":{"AuditPath":"/v1/chat/completions","AuditParameter":"messages"}}]'
# 启动应用 (Deno 2.4.3 兼容的权限设置)
CMD ["deno", "run", \
"--allow-net", \
"--allow-env", \
"--allow-read", \
"--allow-write", \
"--allow-ffi", \
"--no-prompt", \
"--no-check", \
"main.ts"] |