Files
riotpiao.com/Dockerfile
T
Story Crater Bot e706f62a83 feat: rewrite portfolio cards for recruiter-scannable impact
- Reorder projects: Poimen Orchestration → Memory → Homelab → RBC → AWS
- Add Poimen (Ποιμήν) timeline card with Graph-RAG + Temporal pillars
- Rewrite all 6 timeline cards: bold frameworks, quantified impact, emoji sections
- Update Homelab card: production-grade framing, milestone-driven bullets
- Fix CI status links: update API allowlist for riotpiao-poimen org repos
- Fix commit SHA: Dockerfile NEXT_PUBLIC_COMMIT_SHA + CI --build-arg
- Connect Poimen Memory card as 'the memory layer behind Poimen'
2026-09-10 04:54:38 +09:00

50 lines
1012 B
Docker

# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files
COPY package.json pnpm-lock.yaml ./
# Install pnpm
RUN npm install -g pnpm
# Install dependencies (skip build scripts - sharp will use wasm fallback)
RUN pnpm install --frozen-lockfile --ignore-scripts
# Copy source
COPY . .
# Pass commit SHA at build time
ARG COMMIT_SHA=dev
ENV NEXT_PUBLIC_COMMIT_SHA=${COMMIT_SHA}
# Build Next.js app
RUN pnpm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
# Install dumb-init for proper signal handling
RUN apk add --no-cache dumb-init
# Create non-root user
RUN addgroup -g 1001 -S nodejs && \
adduser -S nextjs -u 1001
# Copy built app from builder
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
USER nextjs
EXPOSE 3000
ENV NODE_ENV=production
ENTRYPOINT ["dumb-init", "--"]
CMD ["node", "server.js"]