The app as a systemd user service, reloaded by a VS Code task

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-16 15:48:05 +01:00
1 parent 8fa555f43b
commit 0a862758fb
3 files changed
+32

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
# The app as a systemd user service (WSL), without VS Code: README.md, "Run as a service".
[Unit]
Description=AIMsight diagnostic app (http://127.0.0.1:8770)
[Service]
WorkingDirectory=%h/aimsight-app
# claude (Claude Code, subscription) is in ~/.local/bin, which a service does not get from the shell
Environment=PATH=%h/.local/bin:/usr/local/bin:/usr/bin:/bin
# a restart rebuilds the page, so a change of the code needs only: systemctl --user restart aimsight-app
ExecStartPre=/bin/sh -c 'cd app/web && npm run build'
ExecStart=%h/aimsight-app/.venv/bin/python app/server/server.py --no-browser
Restart=on-failure
[Install]
WantedBy=default.target