Initial commit: Next.js + Payload CMS for moreminimore-redesign

- Next.js 16 App Router + Payload CMS 3.82
- PostgreSQL via @payloadcms/db-postgres
- All pages: Home, Services (4), About, Portfolio, Blog, Contact, FAQ
- PDPA: CookieBanner, ConsentLogs API, Privacy Policy, Terms, Cookie Policy
- SEO: sitemap, robots.txt, metadata exports, JSON-LD
This commit is contained in:
Kunthawat
2026-04-11 08:43:08 +07:00
commit 57185e174d
51 changed files with 6714 additions and 0 deletions

39
Dockerfile Normal file
View File

@@ -0,0 +1,39 @@
# Multi-stage Dockerfile for Next.js + Payload CMS with PostgreSQL
# Requires `output: 'standalone'` in next.config.ts
FROM node:22-alpine AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json pnpm-lock.yaml* ./
RUN corepack enable && corepack prepare pnpm@9.0.0 --activate && pnpm install --frozen-lockfile
FROM deps AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN pnpm build
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
RUN mkdir .next
RUN chown nextjs:nodejs .next
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 PORT 3000
ENV HOSTNAME="0.0.0.0"
CMD ["node", "server.js"]