deploy: replace rsync with git pull + composer install
This commit is contained in:
parent
fd473f00af
commit
4cb07cd6a2
1 changed files with 5 additions and 23 deletions
28
deploy.sh
28
deploy.sh
|
|
@ -1,29 +1,11 @@
|
|||
#!/bin/bash
|
||||
# Auf miniweb ausführen: bash /var/www/tracker/deploy.sh
|
||||
set -e
|
||||
|
||||
REMOTE="root@miniweb.kuehn.home"
|
||||
REMOTE_DIR="/var/www/tracker"
|
||||
SSH="ssh -p 30183"
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
rsync -av \
|
||||
-e "$SSH" \
|
||||
--exclude='.claude/' \
|
||||
--exclude='.superpowers/' \
|
||||
--exclude='.aider*' \
|
||||
--exclude='vendor/' \
|
||||
--exclude='var/' \
|
||||
--exclude='docs/' \
|
||||
--exclude='.env.local' \
|
||||
--exclude='deploy.sh' \
|
||||
--exclude='include/' \
|
||||
--exclude='api.php' \
|
||||
--exclude='index.php' \
|
||||
/srv/http/zieltracker/ $REMOTE:$REMOTE_DIR/
|
||||
|
||||
# composer install auf dem Server
|
||||
$SSH $REMOTE "cd $REMOTE_DIR && composer install --no-dev --no-interaction --optimize-autoloader 2>&1 | tail -5"
|
||||
|
||||
# Cache leeren
|
||||
$SSH $REMOTE "cd $REMOTE_DIR && php bin/console cache:clear --env=prod --no-warmup 2>&1"
|
||||
git pull
|
||||
composer install --no-dev --no-interaction --optimize-autoloader --ignore-platform-reqs
|
||||
APP_ENV=prod php bin/console cache:clear --env=prod --no-warmup
|
||||
|
||||
echo "Deploy fertig."
|
||||
|
|
|
|||
Loading…
Reference in a new issue