fix(dockerfile): remove migrator stage that was overriding default CMD to payload migrate
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 11s
Build & Deploy / 🧪 QA (push) Successful in 2m49s
Build & Deploy / 🏗️ Build (push) Failing after 4m56s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s

This commit is contained in:
2026-03-04 22:10:24 +01:00
parent f1d0227260
commit a2729689d5

View File

@@ -64,18 +64,3 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
COPY --from=builder --chown=nextjs:nodejs /app/.next/cache ./.next/cache
CMD ["node", "server.js"]
# ──────────────────────────────────────────────────────────────────────────────
# Stage: Migrator — used by CI to run "payload migrate" against the live DB.
# Retains node_modules so the payload CLI is available.
# ──────────────────────────────────────────────────────────────────────────────
FROM node:20-alpine AS migrator
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/src/migrations ./src/migrations
COPY --from=builder /app/payload.config.ts ./payload.config.ts
CMD ["node", "node_modules/.bin/payload", "migrate"]