Files
WechatOnCloud/panel/Dockerfile
T
Gloridust 5c5e9c8540 update
2026-05-29 22:00:23 +08:00

24 lines
503 B
Docker
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.
# 面板镜像:前端 Vite 打包 + 后端 Fastify 网关(多架构 amd64/arm64
# --- 1) 构建前端 ---
FROM node:22-slim AS web
WORKDIR /web
COPY web/package.json ./
RUN npm install
COPY web/ ./
RUN npm run build
# --- 2) 后端运行时 ---
FROM node:22-slim AS runtime
WORKDIR /app
ENV NODE_ENV=production
COPY server/package.json ./
RUN npm install
COPY server/ ./
COPY --from=web /web/dist ./web-dist
ENV STATIC_DIR=/app/web-dist \
PORT=8080
EXPOSE 8080
CMD ["npm", "run", "start"]