Pārlūkot izejas kodu

Re-apply next-ws patch after runner-stage npm install in Docker image (#228)

Bernt Christian Egeland 1 mēnesi atpakaļ
vecāks
revīzija
8ab6ab6e73
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. 7 0
      Dockerfile

+ 7 - 0
Dockerfile

@@ -55,6 +55,13 @@ COPY --from=builder --chown=nextjs:nodejs /app/src/generated ./src/generated
 # Install runtime packages for Prisma v7
 RUN npm install prisma@7.6.0 @prisma/client@7.6.0 @prisma/adapter-pg@7.6.0 pg dotenv
 
+# The npm install above re-resolves the dependency tree and replaces the
+# standalone build's PATCHED next package with a fresh unpatched copy from the
+# registry, which silently breaks all WebSocket routes (live updates, work
+# board sync). Re-apply the next-ws patch so the runtime server can accept
+# WebSocket upgrades. next-ws itself is already in the standalone bundle.
+RUN npx next-ws patch --yes
+
 # Copy init script
 COPY --chown=nextjs:nodejs init-db.sh ./init-db.sh
 RUN chmod +x ./init-db.sh