build.sh 1.19 KB
Newer Older
Dominik Hebeler's avatar
Dominik Hebeler committed
1 2 3 4 5 6 7 8 9 10
#!/bin/bash

set -e
# Pfad zum neu geklonten Repo
path=`pwd`
cd ~/
if [ -d MetaGer_neu ]; then rm -rf MetaGer_neu;fi
git clone "$path" MetaGer_neu
cd MetaGer_neu
composer install
11 12
cp $ENVFILE .env
sed -i -e "s/APP_ENV=production/APP_ENV=$STAGE/g" .env
Dominik Hebeler's avatar
Dominik Hebeler committed
13 14
cp $SUMAS config/sumas.json
cp $SUMASEN config/sumasEn.json
Dominik Hebeler's avatar
Dominik Hebeler committed
15 16 17 18
scp -P 63824 metager@metager3.de:~/blacklistUrl.txt config/
scp -P 63824 metager@metager3.de:~/blacklistDomains.txt config/
scp -P 63824 metager@metager3.de:~/adBlacklistUrl.txt config/
scp -P 63824 metager@metager3.de:~/adBlacklistDomains.txt config/
Dominik Hebeler's avatar
Dominik Hebeler committed
19
scp -P 63824 metager@metager3.de:~/spam.txt config/
20
scp -P 63824 metager@metager3.de:~/UsersSeeder.php database/seeds/
Dominik Hebeler's avatar
Dominik Hebeler committed
21 22 23
touch storage/logs/laravel.log
touch storage/logs/worker.log
touch database/metager.sqlite
24 25
touch database/useragents.sqlite
chmod 777 config/sumas.json config/sumas.json database/metager.sqlite database/useragents.sqlite
Dominik Hebeler's avatar
Dominik Hebeler committed
26 27 28 29
chmod -R 777 storage
chmod -R 777 bootstrap/cache
npm install
npm run production
30 31 32 33 34 35 36
php artisan requests:gather
if [ -f ~/MetaGer/artisan ]; then php ~/MetaGer/artisan down;fi
cd ~/
while [ -d ~/MetaGer ]; do rm -rf ~/MetaGer;done
mv MetaGer_neu MetaGer
sudo pkill --signal SIGHUP supervisord
php ~/MetaGer/artisan up