From cab26fcb8db7ec2555933a809446b1952638317a Mon Sep 17 00:00:00 2001 From: Daniel Mason Date: Sun, 2 Jun 2019 17:14:11 +1200 Subject: [PATCH] Initial commit --- README.md | 3 ++- update.sh | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100755 update.sh diff --git a/README.md b/README.md index fead8e0..3e117c9 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # pixelfed-upgrade-script -A simple upgrade script to update pixelfed \ No newline at end of file +A simple upgrade script to update pixelfed via cron nightly. + diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..27a57d0 --- /dev/null +++ b/update.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# CONFIGURATION # + +WEB_ROOT=/var/www/pixelfed +WEB_USER=www-data + +# DO NOT EDIT BELOW THIS LINE # +set +x + +cd $WEB_ROOT +su - $WEB_USER -s /bin/bash -c 'git pull' +su - $WEB_USER -s /bin/bash -c 'composer install --no-ansi --no-interaction --no-progress --no-scripts --optimize-autoloader' +su - $WEB_USER -s /bin/bash -c 'php artisan config:cache' +su - $WEB_USER -s /bin/bash -c 'php artisan route:cache' +su - $WEB_USER -s /bin/bash -c 'php artisan migrate --force' +su - $WEB_USER -s /bin/bash -c 'php artisan horizon:purge' +su - $WEB_USER -s /bin/bash -c 'php artisan storage:link' +