Files
proxy-station/Dockerfile
2026-08-25 11:35:05 +08:00

26 lines
684 B
Docker
Raw Permalink 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.

# ---- 构建阶段完整镜像自带编译工具链better-sqlite3 原生模块)----
FROM node:22 AS build
WORKDIR /app
RUN corepack enable
COPY pnpm-workspace.yaml package.json pnpm-lock.yaml ./
COPY shared/package.json shared/
COPY server/package.json server/
COPY web/package.json web/
RUN CI=true pnpm install --frozen-lockfile
COPY shared/ shared/
COPY server/ server/
COPY web/ web/
RUN pnpm --filter @proxy-station/web build
# ---- 运行阶段 ----
FROM node:22-slim
WORKDIR /app
RUN corepack enable
COPY --from=build /app ./
ENV NODE_ENV=production
ENV PORT=3000
ENV DATA_DIR=/data
VOLUME /data
EXPOSE 3000
CMD ["pnpm", "--filter", "@proxy-station/server", "start"]