初始化 M0:Astro SSR + node:sqlite 脚手架与只读页面

This commit is contained in:
zhongluofeng authored and trae-solo-agent committed 2026-10-30 15:34:50 +08:00
1 parent 97440b4120
commit 8430e5304d
39 files changed
+6398 -1

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
# syntax=docker/dockerfile:1
# ---- 依赖 ----
FROM node:24-alpine AS deps
WORKDIR /app
RUN npm i -g pnpm@10.5.2
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
# ---- 构建 ----
FROM node:24-alpine AS build
WORKDIR /app
RUN npm i -g pnpm@10.5.2
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN pnpm build
# ---- 运行 ----
FROM node:24-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=3000
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/package.json ./package.json
COPY --from=build /app/migrations ./migrations
COPY --from=build /app/scripts ./scripts
RUN mkdir -p /app/data
EXPOSE 3000
CMD ["node", "./dist/server/entry.mjs"]