2 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

View File

@@ -42,9 +42,10 @@ COPY . .
RUN pnpm build
# Transpile migrations to JS for production compatibility (ESM requires extensions)
RUN npx tsc migrations/*.ts --outDir migrations --module esnext --target esnext --moduleResolution node --esModuleInterop --skipLibCheck || true && \
sed -i 's/from "\.\/\([^"]*\)";/from ".\/\1.js";/g' migrations/index.js && \
rm migrations/*.ts
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
@@ -67,8 +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/migrations_built ./migrations
COPY --from=builder --chown=nextjs:nodejs /app/migrations/*.json ./migrations/
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