Compare commits

2 Commits

Author SHA1 Message Date
Docker Config Backup
131b0d0df1 chore: add deploy-tkb.sh
Mirrors the rsync workflow I've been running by hand. Patches the production
<title> to "Tunely" (local index.html keeps "Tunely-DEV" so dev tabs are
distinguishable) and restarts the tkb-plan pm2 process.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:24:52 +02:00
Docker Config Backup
c3eda37f65 fix(dev): vite proxy → port 3090
The TKB server runs on 3090; the proxy was still pointed at 3080 from the
METRO project origin, so the dev server returned the wrong schema (stations
instead of people).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:22:37 +02:00
2 changed files with 28 additions and 1 deletions

27
web/deploy-tkb.sh Executable file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
# Deploy TKB Plán služeb to copelk
set -e
REMOTE="copelk"
REMOTE_DIR="~/tkb-plan/web"
echo "Building..."
cd "$(dirname "$0")"
npx vite build
echo "Syncing to $REMOTE..."
rsync -avz --delete \
--exclude='node_modules' \
--exclude='.git' \
--exclude='saved_schedule.json' \
--exclude='schedules' \
--exclude='uploads' \
./ "$REMOTE:$REMOTE_DIR/"
echo "Patching production title (Tunely-DEV → Tunely)..."
ssh $REMOTE "sed -i 's|<title>Tunely-DEV</title>|<title>Tunely</title>|' $REMOTE_DIR/dist/index.html"
echo "Restarting service on remote..."
ssh $REMOTE "pm2 restart tkb-plan"
echo "Done! App running on copelk:3090"

View File

@@ -6,7 +6,7 @@ export default defineConfig({
plugins: [react(), tailwindcss()],
server: {
proxy: {
'/api': 'http://localhost:3080',
'/api': 'http://localhost:3090',
},
},
})