19 lines
643 B
Bash
Executable file
19 lines
643 B
Bash
Executable file
#!/bin/bash
|
|
# Auf caddy-proxy ausführen: bash /var/www/de.schaunwama/dudi/deploy.sh
|
|
set -e
|
|
|
|
cd "$(dirname "$0")"
|
|
|
|
RUN="su -s /bin/sh www-data -c"
|
|
|
|
$RUN "git pull"
|
|
$RUN "COMPOSER_ALLOW_SUPERUSER=1 composer install --no-dev --no-interaction --optimize-autoloader --ignore-platform-reqs"
|
|
|
|
# Alias-Deployment: RewriteBase auf /dd/ setzen
|
|
sed -i 's|RewriteBase /$|RewriteBase /dd/|' public/.htaccess
|
|
|
|
$RUN "APP_ENV=prod php bin/console doctrine:migrations:migrate --no-interaction --env=prod"
|
|
$RUN "APP_ENV=prod php bin/console cache:clear --env=prod --no-warmup"
|
|
$RUN "APP_ENV=prod php bin/console cache:warmup --env=prod"
|
|
|
|
echo "Deploy fertig."
|