fix: Add SSH port support and exclude deployment build from Git

- Updated .gitignore to exclude /deployment/build/ directory
- Added FTP_PORT configuration to .env.upload.example
- Enhanced upload.sh to support custom SSH ports (default 22, configurable)
- Deployment build artifacts are now properly excluded from version control

The upload script now correctly handles custom SSH ports like 2222.
This commit is contained in:
Johannes
2025-09-07 14:48:45 +02:00
parent d4de83ceb1
commit 58764765dd
3 changed files with 9 additions and 1 deletions

1
.gitignore vendored
View File

@@ -16,6 +16,7 @@ vendor/
/backend/public/static/
/frontend/build/
/build_temp/
/deployment/build/
# Log files
*.log

View File

@@ -13,6 +13,9 @@ FTP_PASS="dein-passwort"
# Pfad auf dem Server (meist /htdocs, /public_html, /www oder /)
FTP_PATH="/htdocs"
# SSH/SFTP Port (Standard: 22)
FTP_PORT="22"
# Beispiele für verschiedene Provider:
# Strato: FTP_HOST="ftp.strato.de" FTP_PATH="/htdocs"
# 1&1: FTP_HOST="ftp.1und1.de" FTP_PATH="/htdocs"

View File

@@ -27,9 +27,13 @@ set -a # Export aller Variablen
source "$ENV_FILE"
set +a
# Standard-Port falls nicht gesetzt
FTP_PORT=${FTP_PORT:-22}
echo "🔧 KONFIGURATION:"
echo " Host: $FTP_HOST"
echo " User: $FTP_USER"
echo " Port: $FTP_PORT"
echo " Path: $FTP_PATH"
echo ""
@@ -73,7 +77,7 @@ echo "📤 Uploade via SFTP..."
lftp -c "
set sftp:auto-confirm yes;
set ssl:verify-certificate no;
open sftp://$FTP_USER:$FTP_PASS@$FTP_HOST;
open sftp://$FTP_USER:$FTP_PASS@$FTP_HOST:$FTP_PORT;
cd $FTP_PATH;
lcd deployment/build;