blog-server/Dockerfile
skyone-wzw 54b408ceec
优化 UI, 明确指定各个元素在 grid 中的位置
* 写死各个页面的 grid 布局
* 部分图片使用 blur 图片优化
2024-01-05 13:17:08 +08:00

22 lines
503 B
Docker

FROM node:20-alpine AS base
FROM base AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci
FROM base AS runner
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV NEXT_TELEMETRY_DISABLED=1
RUN npx prisma generate
RUN npm run patch-font
RUN npm run build
EXPOSE 3000
VOLUME ["/data"]
ENV PORT=3000 NODE_ENV=production HOSTNAME="0.0.0.0" DATA_DIR="/data" DATABASE_URL="file:/data/data.db"
CMD ["sh", "docker-bootstrap.sh"]