Skip to content

feat(notifications): add domain change notifications - #5766

Closed
tarikyalcinkaya wants to merge 2 commits into
Dokploy:canaryfrom
tarikyalcinkaya:feat/domain-change-notifications
Closed

tarikyalcinkaya wants to merge 2 commits into
Dokploy:canaryfrom
tarikyalcinkaya:feat/domain-change-notifications

Conversation

@tarikyalcinkaya

@tarikyalcinkaya tarikyalcinkaya commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

What is this PR about?

Adds a "Domain Changes" notification event so external tools can react to the set of domains
Dokploy serves (uptime monitors, DNS automation, inventory). It follows the shape of the existing
notification types: a single domainChanged flag, a sender for every provider, and a switch in
"Select the actions."

  • Fired whenever a domain is created, updated or removed, including domains created by templates,
    imports and project duplication.
  • Deleting an application, compose or project sends a removed event for each of its domains, since
    they are cascade-deleted there and that path would otherwise be silent.
  • Preview deployment domains are skipped.
  • The custom provider gets a structured payload: event (created / updated / removed),
    domainId, host, url, https, path, port, enabled, plus project, service and
    environment names.

The generated migration also contains a whitelabelingConfig default change; that comes from
drift already on canary (the schema default was changed without a migration), not from this PR.

How I tested it

On a local instance (pnpm dokploy:dev) with a custom notification pointed at a local listener:

  1. Before: the notification form had no domain event and nothing was sent on domain changes.
  2. Enabled "Domain Changes", then added, edited, disabled and deleted an application domain:
    received created, updated, updated with enabled: false, and removed, each with the
    right URL (including https and path).
  3. Added a compose domain: created with serviceType: compose.
  4. Deleted an application with two domains and a compose with one: one removed per domain.
  5. Turned the switch off and repeated: nothing was sent to that notification, while another
    notification with the switch on still received the event.
  6. Reopened the notification: the switch state loads and saves correctly.
  7. Delivery runs in the background; with a stalled webhook, creating a domain still returned in ~50 ms.

pnpm test, pnpm typecheck and pnpm build pass.

Checklist

Issues related (if applicable)

closes #4938

Screenshots (if applicable)

add-notification-domain-changes

RetriggerView in GreptileConfidence Score: 1/5

Fix the broken notification-create inputs, request-blocking delivery, and missing lifecycle events before merging.

Summary

Adds opt-in domain-change notifications across the supported providers, including structured custom webhook payloads and a settings switch.

  • Domain changes now send events to each organization's chosen notification channels.

Acknowledged: tarikyalcinkaya states that the whitelabelingConfig default change comes from existing schema drift on canary, not this feature.

Reviews (1) · Last reviewed commit: "feat(notifications): add domain change n..." · Reviewed by Greptile

Comment thread packages/server/src/db/schema/notification.ts Outdated
Comment thread apps/dokploy/server/api/routers/domain.ts Outdated
Comment thread apps/dokploy/server/api/routers/domain.ts Outdated
Comment thread apps/dokploy/server/api/routers/application.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notification triggers for domain lifecycle events (added / updated / removed)

2 participants