-
Notifications
You must be signed in to change notification settings - Fork 6
/
staging.sh
executable file
·28 lines (23 loc) · 1.23 KB
/
staging.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
sudo /etc/init.d/apache2 stop
sudo -u www-data /bin/rm -rf app/cache/dev/* app/cache/test/* app/cache/prod/*
/bin/rm -rf app/cache/dev/* app/cache/test/* app/cache/prod/*
php ~/composer.phar dump-autoload --optimize
#php app/console cache:clear --env=test --no-warmup
php app/console cache:clear --env=prod --no-warmup
php app/console doctrine:generate:entities BM2 --no-backup
php app/console doctrine:generate:entities Calitarus --no-backup
php app/console assets:install
#php app/console cache:warmup --env=test
php app/console cache:warmup --env=prod
php apc-clear.php
#sudo chown -R www-data app/cache app/logs
# FIXME: add a call to some update script here to update the database where necessary.
sudo /etc/init.d/apache2 start
#ln -s /home/maf/apc.php web/apc.php
# TODO: create static CSS file for use by minify:
#ssh battlemaster.org 'cd /var/bm2/css ; php style.php > style.css'
# Fix the fucking permissions that never stick:
echo "fixing permissions"
sudo /usr/bin/setfacl -dR -m u:www-data:rwX -m u:maf:rwX /home/maf/symfony/app/cache /home/maf/symfony/app/logs /home/maf/symfony/app/spool
sudo /usr/bin/setfacl -R -m u:www-data:rwX -m u:maf:rwX /home/maf/symfony/app/cache /home/maf/symfony/app/logs /home/maf/symfony/app/spool