diff --git a/Dockerfile b/Dockerfile index 1f65649..2583815 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,10 +32,14 @@ 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 -# Migration assets — drizzle/ holds SQL + meta journal; migrate.mjs uses -# drizzle-orm + postgres which Next.js standalone already traces in. +# Migration assets — drizzle/ holds SQL + meta journal; migrate.mjs runs +# at startup via the entrypoint. Explicitly copy the full drizzle-orm and +# postgres packages because the standalone tracer only includes subpaths +# the app itself imports, not the postgres-js/migrator subpath. COPY --from=builder --chown=nextjs:nodejs /app/drizzle ./drizzle COPY --from=builder --chown=nextjs:nodejs /app/scripts/migrate.mjs ./scripts/migrate.mjs +COPY --from=builder --chown=nextjs:nodejs /app/node_modules/drizzle-orm ./node_modules/drizzle-orm +COPY --from=builder --chown=nextjs:nodejs /app/node_modules/postgres ./node_modules/postgres COPY --chown=nextjs:nodejs docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh RUN chmod +x /usr/local/bin/docker-entrypoint.sh