From b44666e31ecb750ea89bd66ff9a1cd39f5c6d387 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sun, 24 May 2026 11:21:15 -0400 Subject: [PATCH] [systemd] Add a node@ service file --- systemd/.config/systemd/user/node@.service | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 systemd/.config/systemd/user/node@.service diff --git a/systemd/.config/systemd/user/node@.service b/systemd/.config/systemd/user/node@.service new file mode 100644 index 0000000..db9b37c --- /dev/null +++ b/systemd/.config/systemd/user/node@.service @@ -0,0 +1,18 @@ +[Unit] +Description=Node.js dev server for %I +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +Environment=PATH=%h/.local/bin:/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin:/home/powellc/.asdf/shims +EnvironmentFile=%h/.local/etc/node/%i.env +ExecStartPre=/bin/bash -lc 'cd "$NODE_PATH" && if [ -f docker-compose.yml ]; then docker-compose start; fi' +ExecStart=/bin/bash -c 'cd "$NODE_PATH" && exec direnv exec "$NODE_PATH" just run' +Restart=on-failure +RestartSec=2 +StandardOutput=append:/tmp/node.log +StandardError=inherit + +[Install] +WantedBy=default.target