[Unit] Description=My Weekly ToDo List - Boot Update (git pull + build) # Runs the same script as a manual deploy; it skips the rebuild when nothing changed and # leaves starting the app to pm2-root.service, which is ordered after this unit. After=network-online.target Wants=network-online.target Before=pm2-root.service [Service] Type=oneshot ExecStart=/bin/bash /root/My-Weekly-ToDo-List/scripts/update-app.sh WorkingDirectory=/root/My-Weekly-ToDo-List Environment=HOME=/root Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin StandardOutput=journal+console StandardError=journal+console # npm ci + prisma generate + next build in this container takes well over the old 300s. # systemd SIGTERMs a Type=oneshot unit at the timeout, which used to kill npm mid-install # and leave a node_modules tree that npm could no longer clean up (ENOTEMPTY on rmdir). TimeoutStartSec=1800 [Install] WantedBy=multi-user.target