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
|
#!/bin/bash
|
||||||
|
# Auf miniweb ausführen: bash /var/www/tracker/deploy.sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
REMOTE="root@miniweb.kuehn.home"
|
cd "$(dirname "$0")"
|
||||||
REMOTE_DIR="/var/www/tracker"
|
|
||||||
SSH="ssh -p 30183"
|
|
||||||
|
|
||||||
rsync -av \
|
git pull
|
||||||
-e "$SSH" \
|
composer install --no-dev --no-interaction --optimize-autoloader --ignore-platform-reqs
|
||||||
--exclude='.claude/' \
|
APP_ENV=prod php bin/console cache:clear --env=prod --no-warmup
|
||||||
--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"
|
|
||||||
|
|
||||||
echo "Deploy fertig."
|
echo "Deploy fertig."
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue