Skip to content

Instantly share code, notes, and snippets.

@xuboso
Created August 27, 2016 03:29
Show Gist options
  • Select an option

  • Save xuboso/bf8e2d72b8a2a29c147b8abc54475ce2 to your computer and use it in GitHub Desktop.

Select an option

Save xuboso/bf8e2d72b8a2a29c147b8abc54475ce2 to your computer and use it in GitHub Desktop.
symfony deploy script
#!/bin/bash
echo "[pull code] update code from bitbucket repository"
git pull origin master
echo "[composer install] check package to install"
composer install --no-dev --optimize-autoloader
echo "[validate doctrine schema]"
php app/console doctrine:schema:validate
php app/console doctrine:ensure-production-settings
echo "[update database]"
php app/console doctrine:schema:update --dump-sql --force
echo "[clear cache and disable debug]"
php app/console cache:clear --env=prod --no-debug
php app/console assetic:dump --env=prod --no-debug
echo "[modify permissions] cache and log"
sudo chmod -R 777 app/cache/
sudo chmod -R 777 app/logs/
sudo chmod -R 777 app/cache/prod/annotations/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment