--- a/build/post_install.sh Thu Nov 10 02:01:46 2016 +0100
+++ b/build/post_install.sh Thu Nov 10 14:07:02 2016 +0100
@@ -1,13 +1,36 @@
#!/usr/bin/env sh
+if [ -x /usr/local/bin/drush ]; then
+ echo "Reactivate corpus module"
+ /usr/local/bin/drush -r /var/www/corpusdelaparole/drupal pm-enable -y corpus
+ echo "Clear drupal cache"
+ /usr/local/bin/drush -r /var/www/corpusdelaparole/drupal cc all
+fi
+
+
if [ -d /var/www/corpusdelaparole/corpus-back/ ]; then
- pushd /var/www/corpusdelaparole/corpus-back/
+ pushd /var/www/corpusdelaparole/corpus-back/ > /dev/null
echo "Correcting file permissions for back office"
chgrp -R apache storage bootstrap/cache
chmod -R ug+rwx storage bootstrap/cache
- popd
+ echo "Migrating back office database"
+ php artisan migrate -n --force
+
+ echo "Optimizing framework"
+ php artisan optimize
+ php artisan config:cache
+ php artisan route:cache
+
+ echo "Correcting file permissions for back office"
+ chgrp -R apache storage bootstrap/cache
+ chmod -R ug+rwx storage bootstrap/cache
+
+ echo "Put back application in production"
+ php artisan up
+
+ popd > /dev/null
fi