4 Commits

Author SHA1 Message Date
cd6651cc43 fix(migrations): use robust ESM import extensions in Dockerfile for v1.1.9
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Successful in 5m34s
Build & Deploy / 🏗️ Build (push) Successful in 8m28s
Build & Deploy / 🚀 Deploy (push) Failing after 36s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s
Nightly QA / call-qa-workflow (push) Failing after 37s
2026-03-11 00:55:05 +01:00
855390a27b fix(deploy): use dedicated dist-migrations dir and fix sed path in Dockerfile
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 4s
Build & Deploy / 🧪 QA (push) Successful in 4m28s
Build & Deploy / 🏗️ Build (push) Successful in 2m55s
Build & Deploy / 🚀 Deploy (push) Failing after 31s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-03-11 00:46:10 +01:00
ea8bd46973 fix(deploy): add .js extensions to transpiled migration imports for ESM compatibility
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 5m30s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🏗️ Build (push) Failing after 3m20s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-03-11 00:38:23 +01:00
ff269b1f84 fix(deploy): transpile migrations to JS for production compatibility
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 11s
Build & Deploy / 🧪 QA (push) Successful in 5m3s
Build & Deploy / 🏗️ Build (push) Successful in 7m14s
Build & Deploy / 🚀 Deploy (push) Failing after 32s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-03-11 00:26:46 +01:00
2 changed files with 8 additions and 2 deletions

View File

@@ -41,8 +41,15 @@ COPY . .
# Build application
RUN pnpm build
# Transpile migrations to JS for production compatibility (ESM requires extensions)
RUN mkdir -p dist-migrations && \
npx tsc migrations/*.ts --outDir dist-migrations --module esnext --target esnext --moduleResolution node --esModuleInterop --skipLibCheck || true && \
cp migrations/*.json dist-migrations/ 2>/dev/null || true && \
sed -i -E 's/(from|import) "\.\/([^"]*)"/\1 ".\/\2.js"/g' dist-migrations/index.js
# Stage 2: Runner
FROM node:20-alpine AS runner
# ... [skipping middle part as I'm replacing lines 45-64 in a single block] ...
WORKDIR /app
# Install curl for health checks
@@ -61,6 +68,7 @@ ENV NEXT_TELEMETRY_DISABLED=1
# Copy standalone output and static files
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/dist-migrations ./migrations
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
COPY --from=builder --chown=nextjs:nodejs /app/.next/cache ./.next/cache

View File

@@ -7,7 +7,6 @@ import sharp from "sharp";
import path from "path";
import { fileURLToPath } from "url";
import { payloadBlocks } from "./blocks/allBlocks";
import { migrations } from "../../migrations/index";
import { Users } from "./collections/Users";
import { Media } from "./collections/Media";
@@ -41,7 +40,6 @@ export default buildConfig({
outputFile: path.resolve(dirname, "payload-types.ts"),
},
db: postgresAdapter({
migrations,
pool: {
connectionString:
process.env.DATABASE_URI ||