systemd daemons run with WorkingDirectory=/ by default; docker compose derives the project name from basename(cwd), which is empty at '/', and aborts with 'project name must not be empty'. Pass -p decnet explicitly so the project name is independent of cwd, and set WorkingDirectory=/opt/decnet on the three DECNET units so compose artifacts (decnet-compose.yml, build contexts) also land in the install dir.
19 lines
530 B
Django/Jinja
19 lines
530 B
Django/Jinja
[Unit]
|
|
Description=DECNET worker agent (mTLS control plane) — {{ agent_name }}
|
|
Documentation=https://github.com/anti/DECNET
|
|
After=network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
WorkingDirectory=/opt/decnet
|
|
Environment=DECNET_SYSTEM_LOGS=/var/log/decnet/decnet.agent.log
|
|
ExecStart=/usr/local/bin/decnet agent --no-forwarder
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
StandardOutput=append:/var/log/decnet/decnet.agent.log
|
|
StandardError=append:/var/log/decnet/decnet.agent.log
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|