research-notes/Dockerfile
jordan a65c3f7243
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Initial orchard9 deployment
- Add Dockerfile with multi-stage standalone build
- Add Woodpecker CI pipeline (.woodpecker.yml)
- Add Kubernetes manifests for deployment, service, ingress
- Add ops.md with deployment documentation
- Configure Next.js for standalone output
- Move deployment files to root level

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 14:42:06 -07:00

43 lines
940 B
Docker

# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
# Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate
# Copy package files
COPY blog/package.json blog/pnpm-lock.yaml ./
# Install dependencies
RUN pnpm install --frozen-lockfile
# Copy source
COPY blog/ .
# Build
RUN pnpm build
# Runtime stage
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=3000
# Don't run as root
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs
# Copy standalone build
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
# Content is read at build time for SSG, but copy for any runtime needs
COPY --from=builder --chown=nextjs:nodejs /app/content ./content
USER nextjs
EXPOSE 3000
CMD ["node", "server.js"]