From 74dc009c3dae31d3def5f6da98d174ca4afe8acc Mon Sep 17 00:00:00 2001 From: Your Name Date: Sun, 19 Apr 2026 02:22:56 +0800 Subject: [PATCH] fix: inherit sync env in node agent --- .../multi-region/templates/domaincheck-node-agent.env.example | 2 +- domain-api/deploy/systemd/domain-node-agent.service | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/domain-api/deploy/multi-region/templates/domaincheck-node-agent.env.example b/domain-api/deploy/multi-region/templates/domaincheck-node-agent.env.example index f867a84..458174b 100644 --- a/domain-api/deploy/multi-region/templates/domaincheck-node-agent.env.example +++ b/domain-api/deploy/multi-region/templates/domaincheck-node-agent.env.example @@ -11,5 +11,5 @@ API_SERVICE_NAME=domaincheck-api SYNC_AGENT_SERVICE_NAME=domaincheck-sync-agent NODE_AGENT_SERVICE_NAME=domaincheck-node-agent -OPS_AGENT_CAPABILITIES=["service.start","service.stop","service.restart","service.status","runtime.start_worker","runtime.stop_worker","runtime.restart_api","runtime.start_sync_agent","runtime.stop_sync_agent","health.snapshot","logs.collect","diagnostics.collect","deploy.release"] +OPS_AGENT_CAPABILITIES=["service.start","service.stop","service.restart","service.status","runtime.start_worker","runtime.stop_worker","runtime.start_detection","runtime.stop_detection","runtime.pull_tasks","runtime.restart_api","runtime.start_sync_agent","runtime.stop_sync_agent","health.snapshot","logs.collect","diagnostics.collect","deploy.release"] OPS_AGENT_LABELS={} diff --git a/domain-api/deploy/systemd/domain-node-agent.service b/domain-api/deploy/systemd/domain-node-agent.service index 9e2a520..84300cd 100644 --- a/domain-api/deploy/systemd/domain-node-agent.service +++ b/domain-api/deploy/systemd/domain-node-agent.service @@ -5,6 +5,7 @@ After=network.target [Service] Type=simple WorkingDirectory=/opt/domaincheck/domain-api +EnvironmentFile=-/etc/default/domaincheck-api EnvironmentFile=-/etc/default/domaincheck-node-agent Environment="PATH=/home/www/.nvm/versions/node/v20.20.2/bin:/home/www/.local/bin:/home/www/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin" ExecStart=/opt/domaincheck/domainCheck/.venv/bin/python -m app.node_agent @@ -12,6 +13,7 @@ Restart=always RestartSec=5 User=www Group=www +SupplementaryGroups=systemd-journal [Install] WantedBy=multi-user.target