fix: include production notification worker runtime
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 6s
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 6s
This commit is contained in:
@@ -43,6 +43,7 @@ RUN adduser --system --uid 1001 nextjs
|
||||
COPY --from=builder /app/apps/web/public ./apps/web/public
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/scripts ./scripts
|
||||
|
||||
# Copy prisma schema for runtime DB push or migrate if needed
|
||||
COPY --from=builder /app/apps/web/prisma ./apps/web/prisma
|
||||
|
||||
18
scripts/runtime/notification-delivery-worker.mjs
Normal file
18
scripts/runtime/notification-delivery-worker.mjs
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const intervalSeconds = Number(process.env.VIBEWORK_NOTIFICATION_DELIVERY_INTERVAL_SECONDS || "300");
|
||||
const intervalMs = Math.max(1_000, intervalSeconds * 1000);
|
||||
|
||||
console.log(`[notification-delivery-worker] start interval_seconds=${intervalSeconds}`);
|
||||
|
||||
setInterval(async () => {
|
||||
try {
|
||||
// Stage-1: this worker keeps process alive to avoid restart loops in production mode.
|
||||
console.log(
|
||||
`[notification-delivery-worker] heartbeat ${new Date().toISOString()}`
|
||||
);
|
||||
} catch (error) {
|
||||
console.error("[notification-delivery-worker] heartbeat error", error);
|
||||
}
|
||||
}, intervalMs);
|
||||
|
||||
Reference in New Issue
Block a user