[Unit] Description=InvenTree Stock Tool (SvelteKit) After=network-online.target Wants=network-online.target [Service] Type=simple User=www-data Group=www-data WorkingDirectory=/opt/inventree-stock-tool EnvironmentFile=/opt/inventree-stock-tool/.env # Prepend user-site bin so `inventree-part-import` installed via `pip install --user` # is on PATH. Adjust the path if you install it into a venv instead. Environment=PATH=/opt/inventree-stock-tool/.local/bin:/usr/local/bin:/usr/bin:/bin ExecStart=/usr/bin/node build Restart=on-failure RestartSec=3 StandardOutput=journal StandardError=journal # Basic hardening NoNewPrivileges=yes PrivateTmp=yes ProtectSystem=strict ReadWritePaths=/opt/inventree-stock-tool ProtectHome=yes ProtectKernelTunables=yes ProtectKernelModules=yes ProtectControlGroups=yes [Install] WantedBy=multi-user.target