fix(deploy): bundle migrations into Next.js standalone output
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 5s
Build & Deploy / 🧪 QA (push) Failing after 1m12s
Build & Deploy / 🏗️ Build (push) Failing after 3m58s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 4s

This commit is contained in:
2026-03-11 00:24:08 +01:00
parent 9b55c42f35
commit afa586c833
2 changed files with 2 additions and 1 deletions

View File

@@ -61,7 +61,6 @@ 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 ./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,6 +7,7 @@ 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";
@@ -40,6 +41,7 @@ export default buildConfig({
outputFile: path.resolve(dirname, "payload-types.ts"),
},
db: postgresAdapter({
migrations,
pool: {
connectionString:
process.env.DATABASE_URI ||