The server carries its own manifest and runs from its own folder
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
6369765378
commit
29e908efeb
+5
-5
@@ -14,11 +14,11 @@ npm run build
|
||||
rsync -az --delete --filter='P _app/immutable/*' \
|
||||
build/ "root@$HOST:/opt/waving-hands/build/"
|
||||
|
||||
# The server runs from source with tsx; it needs the engine, its own code,
|
||||
# and the dependency manifest. Ledgers live outside this tree and survive.
|
||||
rsync -az --delete \
|
||||
# The server runs from source with tsx and carries its own small manifest;
|
||||
# it needs only its code and the engine. Ledgers live outside this tree.
|
||||
rsync -az --delete --exclude='/server/node_modules' \
|
||||
--include='/server/***' --include='/src/' --include='/src/lib/' --include='/src/lib/game/***' \
|
||||
--include='/package.json' --include='/package-lock.json' --include='/deploy/' --include='/deploy/waving-hands.service' \
|
||||
--include='/deploy/' --include='/deploy/waving-hands.service' \
|
||||
--exclude='*' \
|
||||
./ "root@$HOST:/opt/waving-hands/app/"
|
||||
|
||||
@@ -26,7 +26,7 @@ ssh "root@$HOST" '
|
||||
find /opt/waving-hands/build/_app/immutable -type f -mtime +7 -delete
|
||||
chown -R root:caddy /opt/waving-hands/build
|
||||
chmod -R g+rX /opt/waving-hands/build
|
||||
cd /opt/waving-hands/app && npm install --no-audit --no-fund --omit=optional
|
||||
cd /opt/waving-hands/app/server && npm install --no-audit --no-fund
|
||||
chown -R waving-hands:waving-hands /opt/waving-hands/app
|
||||
cp /opt/waving-hands/app/deploy/waving-hands.service /etc/systemd/system/waving-hands.service
|
||||
systemctl daemon-reload
|
||||
|
||||
@@ -5,12 +5,12 @@ After=network.target
|
||||
[Service]
|
||||
Type=simple
|
||||
User=waving-hands
|
||||
WorkingDirectory=/opt/waving-hands/app
|
||||
WorkingDirectory=/opt/waving-hands/app/server
|
||||
Environment=PORT=8788
|
||||
# Caddy terminates TLS; the plaintext port must not face the internet.
|
||||
Environment=HOST=127.0.0.1
|
||||
Environment=WH_DATA_DIR=/var/lib/waving-hands/rooms
|
||||
ExecStart=/opt/waving-hands/app/node_modules/.bin/tsx server/src/index.ts
|
||||
ExecStart=/opt/waving-hands/app/server/node_modules/.bin/tsx src/index.ts
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user