A team stand on your own computer
The stand is the main branch, rebuilt by itself on every new commit and open to the team at a permanent
HTTPS address. It needs a Windows computer that stays on, Node.js 24+, Git and Tailscale.
GitHub main ──(git fetch every 5 minutes)──▶ D:\Work\TSMC\TSMC-stand\slot-a | slot-b builds take turns │ new commit: install → build → backup → switch over ▼ node, port 3400 ◀── D:\Work\TSMC\TSMC-stand\data database and attachments ▲ Tailscale Funnel ──────────────┘ https://<computer>.<tailnet>.ts.net- A new commit is built in the idle slot while the old version keeps running. If the build fails, the stand stays on the previous version. If the new version gives no answer within 2 minutes, the previous one is started again.
- Every switch is preceded by a backup of the data (
D:\Work\TSMC\TSMC-stand\backups, the latest 10). - The header shows a “Stand · abc1234” badge; hover it for the commit and the build time.
- The data is the demo projects with their run history, but without the demo accounts: their password is public, so on a stand they are locked and stay only as authors of the history. Sign in as the stand administrator, who creates the team’s accounts (“Users” in the header).
Installing
Section titled “Installing”-
Sleep. Settings → System → Power: put the computer to sleep — “Never”. Otherwise the computer is on and the stand is asleep.
-
The stand. From the repository folder:
Окно терминала pwsh -File scripts\stand\stand.ps1 installThe script clones the repository into
D:\Work\TSMC\TSMC-stand\repo, writes the settings toD:\Work\TSMC\TSMC-stand\stand.json, registers the “TSMC stand” scheduled task (started when you sign in to Windows) and starts it. The first build takes a minute or two. At the end it prints the address and the stand administrator’s password, which is also instand.json; change it in the profile after the first sign-in.Options:
-Root(the folder,D:\Work\TSMC\TSMC-standby default),-Port(3400),-Branch(main),-NodeDir(the folder withnode.exe; the current Node from nvm by default),-AdminEmail. -
The public address. Tailscale must be installed and signed in to your tailnet. Once:
Окно терминала & 'C:\Program Files\Tailscale\tailscale.exe' funnel --bg 3400If Funnel is not enabled in the tailnet yet, the command prints a link to the Tailscale admin console: open it, allow HTTPS certificates and Funnel for this computer, then run the command again. The setting is kept by the Tailscale service across restarts. Check it with
tailscale funnel status.
Running it
Section titled “Running it”D:\Work\TSMC\TSMC-stand\stand.ps1 status # what runs, which commit, whether it answersD:\Work\TSMC\TSMC-stand\stand.ps1 update # check main now instead of in 5 minutesD:\Work\TSMC\TSMC-stand\stand.ps1 logs # the stand log and the server errorsD:\Work\TSMC\TSMC-stand\stand.ps1 stop # stop it (the task starts it again at the next sign-in)D:\Work\TSMC\TSMC-stand\stand.ps1 uninstall # remove the task; data and builds stayThe copy of the script in the stand folder finds its folder by itself (by stand.json beside it), so these
commands need no -Root, also when the stand is installed somewhere else than the default folder.
Logs are in D:\Work\TSMC\TSMC-stand\logs: stand.log (version switches), build.log (build output),
server-<time>-<commit>.out.log and .err.log (the server, a pair per start, the latest 20). When a new
version does not start, stand.log names the file with its errors.
stand.json is read again at every check, so a change of port or branch applies without a restart (a new
port, after the next switch). After a change to stand.ps1 itself, run install again: the task runs a copy
of the script from the stand folder, so updating the repository never changes the running supervisor. The
settings and the password are kept by a repeated install.
When something goes wrong
Section titled “When something goes wrong”- The stand does not open after a reboot. The task starts when you sign in to Windows: sign in.
- A broken commit on
main. The stand stays on the previous version and does not build that commit again; the next commit builds as usual.stand.ps1 updatetries the broken commit once more. - Restore the data from a backup.
stand.ps1 stop, then from the current slot’s folder (D:\Work\TSMC\TSMC-stand\slot-aorslot-b, seestatus) withTSMC_DB=D:\Work\TSMC\TSMC-stand\data\tsmc.db:node packages\server\bin\tsmc-server.js restore D:\Work\TSMC\TSMC-stand\backups\tsmc-backup-<time>, then start the “TSMC stand” task again. - Start over with fresh demo data.
stand.ps1 stop, deleteD:\Work\TSMC\TSMC-stand\data, start the task. The administrator is created again with the password fromstand.json.
Security
Section titled “Security”The stand is open to the internet. Signing in is required for everything except the sign-in page and
/api/health; after five failed attempts the “address + email” pair is locked for 15 minutes. Do not use
passwords on the stand that are used anywhere else. Funnel can be turned off at any time with
tailscale funnel --bg 3400 off (the stand keeps running locally).