PM2 runs update-check.mjs as a cron *restart*, and PM2 7 stops a process that is still running at the next minute boundary. Any update that needed npm install or next build (more than ~55s) was killed half-way: the lock was left behind, HEAD had already moved at the pull so the next run saw nothing to do, and next build had already wiped .next under the live server — a box that broke after a weekend push and stayed broken. - The cron run is now a quick CHECK: fetch, decide, and hand the work to a detached worker (--apply) that PM2's next tick can't reach. - "Up to date" is judged against scripts/.built-commit (what .next was built from), not HEAD, so a pull that was never built finishes on the next check. First run on a machine adopts a complete build that is newer than HEAD's last move and rebuilds anything else — that rescues boxes the old updater already stranded. - The previous build is set aside as .next-prev and restored if the build fails, so a broken push never leaves a box without a build; failures retry after 15 min, then hourly (scripts/.update-failed). - The lock holds a pid and is atomic; build dirs are deleted without ever following the links in .next/node_modules into the real node_modules. - Every instance in scripts/instances.json is restarted, and python/pip children stay hidden on Windows now that the worker has no console. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
89 lines
1.5 KiB
Plaintext
89 lines
1.5 KiB
Plaintext
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
|
|
# dependencies
|
|
/node_modules
|
|
/.pnp
|
|
.pnp.*
|
|
.yarn/*
|
|
!.yarn/patches
|
|
!.yarn/plugins
|
|
!.yarn/releases
|
|
!.yarn/versions
|
|
|
|
# testing
|
|
/coverage
|
|
|
|
# next.js
|
|
/.next/
|
|
/out/
|
|
|
|
# production
|
|
/build
|
|
|
|
# misc
|
|
.DS_Store
|
|
*.pem
|
|
|
|
# debug
|
|
npm-debug.log*
|
|
yarn-debug.log*
|
|
yarn-error.log*
|
|
.pnpm-debug.log*
|
|
|
|
# env files (can opt-in for committing if needed)
|
|
.env*
|
|
|
|
# vercel
|
|
.vercel
|
|
|
|
# typescript
|
|
*.tsbuildinfo
|
|
next-env.d.ts
|
|
|
|
# local runtime artifacts
|
|
*.sqlite
|
|
dev.log
|
|
dev.err
|
|
nul
|
|
scripts/lucid-cookies.json
|
|
scripts/lucid-config.json
|
|
scripts/*.png
|
|
autotrader.sqlite
|
|
|
|
# python
|
|
__pycache__/
|
|
*.pyc
|
|
|
|
# generated by the Windows setup / autostart scripts
|
|
scripts/.deps-hash
|
|
scripts/.python-cmd
|
|
scripts/.update.lock
|
|
scripts/update.log
|
|
# updater bookkeeping (scripts/update-check.mjs)
|
|
scripts/.built-commit
|
|
scripts/.update-failed
|
|
scripts/update-worker.log
|
|
# the previous build, set aside while the updater builds (Tailwind's source
|
|
# scan also honours this, so it never reads the old bundles)
|
|
/.next-prev/
|
|
|
|
# clicker virtualenv (Linux/Pi)
|
|
clicker/.venv/
|
|
scripts/.last-check
|
|
|
|
# The deploy template is meant to be read, unlike a real .env
|
|
!deploy/.env.example
|
|
|
|
# publish bookkeeping
|
|
deploy/publish.log
|
|
deploy/.last-check
|
|
deploy/.publish.lock
|
|
*.sqlite-shm
|
|
*.sqlite-wal
|
|
# per-instance databases (add-instance.sh)
|
|
.data/
|
|
# per-device instance registry (add-instance.sh)
|
|
scripts/instances.json
|
|
# yarn is dev-convenience only; npm/package-lock.json governs the fleet
|
|
yarn.lock
|