Remove backend dependencies for standalone repo: drop cargo build from webhook, remove backend systemd unit, clean eslint config

This commit is contained in:
clxud
2026-07-02 02:22:43 +00:00
parent 36092f0269
commit 1e082f63d1
4 changed files with 5 additions and 25 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ export default [
}, },
}, },
{ {
files: ['vite.config.js', 'server.cjs', 'webhook.cjs', 'backend/**/*.cjs'], files: ['vite.config.js', 'server.cjs', 'webhook.cjs'],
languageOptions: { languageOptions: {
globals: globals.node, globals: globals.node,
}, },
+4 -4
View File
@@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Installs/updates the tssbot-web systemd --user units and (re)starts them. # Installs/updates the tssbot-web and tssbot-webhook systemd --user units and (re)starts them.
# Run this after cloning, and again any time a unit file under systemd/ changes. # Run this after cloning, and again any time a unit file under systemd/ changes.
set -euo pipefail set -euo pipefail
@@ -7,16 +7,16 @@ repo_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
unit_dir="${HOME}/.config/systemd/user" unit_dir="${HOME}/.config/systemd/user"
mkdir -p "${unit_dir}" mkdir -p "${unit_dir}"
for unit in tssbot-web tssbot-webhook tssbot-backend; do for unit in tssbot-web tssbot-webhook; do
ln -sf "${repo_dir}/systemd/${unit}.service" "${unit_dir}/${unit}.service" ln -sf "${repo_dir}/systemd/${unit}.service" "${unit_dir}/${unit}.service"
done done
systemctl --user daemon-reload systemctl --user daemon-reload
systemctl --user enable --now tssbot-web.service tssbot-webhook.service tssbot-backend.service systemctl --user enable --now tssbot-web.service tssbot-webhook.service
if [ "$(loginctl show-user "$(whoami)" -p Linger --value 2>/dev/null)" != "yes" ]; then if [ "$(loginctl show-user "$(whoami)" -p Linger --value 2>/dev/null)" != "yes" ]; then
echo "Linger is not enabled for $(whoami) — user services will stop when you log out." echo "Linger is not enabled for $(whoami) — user services will stop when you log out."
echo "Enable it with: sudo loginctl enable-linger $(whoami)" echo "Enable it with: sudo loginctl enable-linger $(whoami)"
fi fi
systemctl --user status --no-pager tssbot-web.service tssbot-webhook.service tssbot-backend.service systemctl --user status --no-pager tssbot-web.service tssbot-webhook.service
-19
View File
@@ -1,19 +0,0 @@
[Unit]
Description=tssbot backend API service
After=network-online.target
Wants=network-online.target
StartLimitIntervalSec=100
StartLimitBurst=10
[Service]
Type=simple
WorkingDirectory=%h/tssbot.web
ExecStart=%h/tssbot.web/backend/target/release/tssbot-backend
Restart=on-failure
RestartSec=200ms
RestartSteps=10
RestartMaxDelaySec=10s
TimeoutStopSec=10
[Install]
WantedBy=default.target
-1
View File
@@ -693,7 +693,6 @@ async function deploy(push) {
await ensureBuildDependencies(previousHead) await ensureBuildDependencies(previousHead)
await run('npm', ['run', 'build', '--', '--outDir', '../dist-next']) await run('npm', ['run', 'build', '--', '--outDir', '../dist-next'])
validateBuiltDist() validateBuiltDist()
await run('cargo', ['build', '--manifest-path', 'backend/Cargo.toml', '--release'])
promoteBuiltDist() promoteBuiltDist()
syncVehicleIcons() syncVehicleIcons()