You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🐛 fix(notifications): use detected daemon host name for controller server identity (#296)
On Docker Compose / Synology setups the process hostname inside the
drydock container is the container ID, so the notification prefix
rendered as [189093dae256] instead of the actual host. Read the daemon
host name via dockerApi.info().Name during local watcher startup and
cache it as the detected server name, falling back to os.hostname()
when the daemon info call is unavailable.
- configuration/index.ts: getServerName precedence is now
DD_SERVER_NAME > detectedServerName > os.hostname(). Add
setDetectedServerName setter for the watcher to populate.
- watchers/providers/docker/docker-remote-auth.ts: call dockerApi.info()
only for local (non-remote) watchers so remote agents don't hijack
the controller identity; the call is best-effort and silently falls
back on failure.
- Regression tests in configuration/index.test.ts and
watchers/providers/docker/docker-remote-auth.test.ts
- README.md + agents/triggers docs reflect the new precedence order
Fixes: #296
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,7 @@ See the [Quick Start guide](https://getdrydock.com/docs/quickstart) for Docker C
152
152
- **Identity-keyed container tracking** — Containers tracked by stable identity key (agent::watcher::name) across renames/replacements, preventing cross-host status contamination.
153
153
- **Watcher next-run schedule visibility** — Watcher API and Agents view now show when each watcher will next poll for updates.
154
154
- **Notification delivery failure audit trail** — Failed notification deliveries surface in the notification bell dropdown for visibility without leaving the UI.
155
-
- **Multi-server notification identification** — Notifications automatically include `[server-name]` prefix when agents are registered, identifying which server each update comes from. Configurable via `DD_SERVER_NAME` (defaults to hostname). Custom templates can use `container.notificationServerName`.
155
+
- **Multi-server notification identification** — Notifications automatically include `[server-name]` prefix when agents are registered, identifying which server each update comes from. Configurable via `DD_SERVER_NAME` (defaults to the detected daemon host name, then the process hostname). Custom templates can use `container.notificationServerName`.
Copy file name to clipboardExpand all lines: content/docs/current/configuration/agents/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -221,4 +221,4 @@ services:
221
221
- **Registries**: Configured on the Agent to check for updates.
222
222
- **Triggers**:
223
223
- `docker`and `dockercompose` triggers are configured and executed **on the Agent** (allowing update of remote containers). The controller automatically proxies update requests to the correct agent.
224
-
- Notification triggers (e.g. `smtp`, `discord`) are configured and executed **on the Controller**. Notifications automatically include a `[server-name]` prefix identifying which server each update comes from. The controller name defaults to the hostname and can be overridden with `DD_SERVER_NAME`.
224
+
- Notification triggers (e.g. `smtp`, `discord`) are configured and executed **on the Controller**. Notifications automatically include a `[server-name]` prefix identifying which server each update comes from. The controller name defaults to the detected Docker or Podman daemon host name when available, then the process hostname, and can be overridden with `DD_SERVER_NAME`.
Copy file name to clipboardExpand all lines: content/docs/current/configuration/triggers/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -157,7 +157,7 @@ Template strings use `${expression}` placeholders. Drydock provides two sets of
157
157
|`container.watcher`| Watcher name |`local`|
158
158
|`container.agent`| Agent name (when using distributed agents) |`remote-1`|
159
159
|`container.notificationAgentPrefix`| Server identification prefix: `[agentName]` + space for agent containers, `[controllerName]` + space for controller containers when agents exist, empty for single-server setups |`[prod-server]`|
160
-
|`container.notificationServerName`| Server identity — agent name for agent containers, controller name (from `DD_SERVER_NAME` or hostname) for controller containers. Always resolved regardless of setup |`prod-server`|
160
+
|`container.notificationServerName`| Server identity — agent name for agent containers, controller name (from `DD_SERVER_NAME`, otherwise the detected daemon host name when available, then the process hostname) for controller containers. Always resolved regardless of setup |`prod-server`|
161
161
|`container.image.name`| Image name |`library/nginx`|
162
162
|`container.image.registry.name`| Registry provider name |`hub`|
0 commit comments