fix: include production notification worker runtime
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 6s

This commit is contained in:
OG T
2026-06-07 16:45:10 +08:00
parent 71a765d1de
commit 4f639c2654
2 changed files with 19 additions and 0 deletions

View File

@@ -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

View 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);