Title: Container crash loop after successful deployment — no notification triggered
Description
When a deployment completes successfully (build + push to registry succeed and
container starts) but the container immediately crashes due to a runtime error,
Dokploy continues to report the deployment as "successful" and does not send any
notifications. The container enters a restart loop (Docker restart policy keeps
trying), but no alert is sent to the configured notification channels (Slack,
Email, etc.).
This is a real production blind spot — the deployment dashboard shows green,
notifications confirm "deployment successful," but the actual app is down.
Reproduction steps
- Configure notifications (Email, Slack, or any) for "Deployment Failed"
and "Deployment Success" events
- Push code to a connected repo with a runtime error that only manifests
after build (e.g., missing environment variable, missing file in standalone
build, broken database connection)
- Wait for Dokploy to build and deploy
- Build completes successfully → "Deployment Success" notification fires
- Container starts but crashes within seconds
- Container restarts repeatedly (visible in Logs tab — multiple "exited X
seconds ago" entries)
- No notification is sent about the crash loop
Expected behavior
I should receive a notification when:
- Container exits unexpectedly (non-zero exit code)
- Container restarts more than N times within M minutes (configurable)
- Health check fails consistently
Actual behavior
Notifications only fire for build/deploy events. Runtime container failures
are not surfaced through the notification system.
My setup
- Dokploy version: [check Settings → About]
- Server: [Contabo VPS / similar]
- App type: Next.js standalone
- Notification channels configured: [Slack/Email/etc]
Real scenario from my deployment
Today I deployed an updated Next.js + Payload CMS app. Build succeeded,
deployment notification was sent. The container crash-looped due to
ERR_MODULE_NOT_FOUND for payload.config.ts — Payload couldn't find its
config file in the standalone build. I had no idea this was happening
until I manually checked the Logs tab and saw 5 containers had exited
in the past minute.
Without external monitoring (UptimeRobot, etc.), there's no way to know
the production app is down despite the deployment "succeeding."
Suggested solutions
A few options the team might consider:
- Container restart count alerts: Notify when a container restarts more
than N times within M minutes (configurable threshold)
- Health check integration: When a health check is configured and fails
for X consecutive checks, fire a notification
- Container exit code monitoring: Notify on any non-zero exit, not just
build/deploy events
- "Stable run" notification: Only fire "deployment successful"
notification after the container has been running stably for N seconds
(e.g., 60s)
Option 4 might be the cleanest — it changes the meaning of "deployment
successful" from "container started" to "container is stably running."
Workarounds I'm using
- External uptime monitor (UptimeRobot) hitting a
/api/health endpoint
- Manual check of the Logs tab after every deployment
Happy to provide more details, logs, or test fixes if that helps.
Title: Container crash loop after successful deployment — no notification triggered
Description
When a deployment completes successfully (build + push to registry succeed and
container starts) but the container immediately crashes due to a runtime error,
Dokploy continues to report the deployment as "successful" and does not send any
notifications. The container enters a restart loop (Docker restart policy keeps
trying), but no alert is sent to the configured notification channels (Slack,
Email, etc.).
This is a real production blind spot — the deployment dashboard shows green,
notifications confirm "deployment successful," but the actual app is down.
Reproduction steps
and "Deployment Success" events
after build (e.g., missing environment variable, missing file in standalone
build, broken database connection)
seconds ago" entries)
Expected behavior
I should receive a notification when:
Actual behavior
Notifications only fire for build/deploy events. Runtime container failures
are not surfaced through the notification system.
My setup
Real scenario from my deployment
Today I deployed an updated Next.js + Payload CMS app. Build succeeded,
deployment notification was sent. The container crash-looped due to
ERR_MODULE_NOT_FOUNDfor payload.config.ts — Payload couldn't find itsconfig file in the standalone build. I had no idea this was happening
until I manually checked the Logs tab and saw 5 containers had exited
in the past minute.
Without external monitoring (UptimeRobot, etc.), there's no way to know
the production app is down despite the deployment "succeeding."
Suggested solutions
A few options the team might consider:
than N times within M minutes (configurable threshold)
for X consecutive checks, fire a notification
build/deploy events
notification after the container has been running stably for N seconds
(e.g., 60s)
Option 4 might be the cleanest — it changes the meaning of "deployment
successful" from "container started" to "container is stably running."
Workarounds I'm using
/api/healthendpointHappy to provide more details, logs, or test fixes if that helps.