-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-hostinger.sh
More file actions
executable file
·61 lines (54 loc) · 1.69 KB
/
deploy-hostinger.sh
File metadata and controls
executable file
·61 lines (54 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# ============================================================
# CoupleTimer – Hostinger Deployment Script
# Domain: coupletimer.site
# ============================================================
# Verwendung:
# chmod +x deploy-hostinger.sh
# ./deploy-hostinger.sh <SSH-USER> <SSH-HOST>
#
# Beispiel:
# ./deploy-hostinger.sh u123456789 srv123.niagahoster.com
#
# SSH-User + Host findest du in Hostinger hPanel:
# hPanel → Hosting → SSH Access → Details
# ============================================================
set -e
SSH_USER="${1:-}"
SSH_HOST="${2:-coupletimer.site}"
REMOTE_PATH="/home/${SSH_USER}/public_html"
LOCAL_DIST="./app/dist"
if [ -z "$SSH_USER" ]; then
echo "❌ Fehler: SSH-User fehlt"
echo " Verwendung: ./deploy-hostinger.sh u123456789 srv123.niagahoster.com"
echo ""
echo " SSH-Zugangsdaten findest du in Hostinger hPanel:"
echo " hPanel → Hosting → SSH Access"
exit 1
fi
echo "🔨 Baue Projekt..."
cd app
node_modules/.bin/tsc -b
node_modules/.bin/vite build
cd ..
echo ""
echo "📦 Deploye auf Hostinger..."
echo " User: $SSH_USER"
echo " Host: $SSH_HOST"
echo " Pfad: $REMOTE_PATH"
echo ""
# Upload via rsync über SSH
rsync -avz --delete \
--exclude='.DS_Store' \
-e "ssh -p 65002 -o StrictHostKeyChecking=accept-new" \
"${LOCAL_DIST}/" \
"${SSH_USER}@${SSH_HOST}:${REMOTE_PATH}/"
echo ""
echo "✅ Deployment abgeschlossen!"
echo ""
echo "🌐 Prüfe: https://coupletimer.site"
echo "📢 ads.txt: https://coupletimer.site/ads.txt"
echo "🔒 Privacy: https://coupletimer.site/#/privacy"
echo ""
echo "⚠️ Hinweis: DNS-Propagierung kann 24-48h dauern"
echo " Status prüfen: https://www.whatsmydns.net/#A/coupletimer.site"