Fixed index.astro: escaped curly braces in code display block to prevent Astro parser misinterpreting them as expressions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
37 lines
651 B
Docker
37 lines
651 B
Docker
FROM node:20-alpine AS deps
|
|
|
|
RUN apk add --no-cache python3 make g++
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json pnpm-lock.yaml* ./
|
|
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
|
|
RUN pnpm install
|
|
|
|
FROM deps AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
|
|
RUN pnpm build
|
|
|
|
FROM deps AS runner
|
|
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
RUN adduser --system --uid 1001 astro
|
|
USER astro
|
|
|
|
COPY --from=builder /app/node_modules ./node_modules
|
|
COPY --from=builder /app/dist ./dist
|
|
COPY --from=builder /app/public ./public
|
|
COPY --from=builder /app/data.db ./data.db
|
|
|
|
EXPOSE 4321
|
|
|
|
CMD ["node", "./dist/server/entry.mjs"]
|