Skip to content

Instantly share code, notes, and snippets.

@h4cc
Created December 1, 2013 12:01
Show Gist options
  • Save h4cc/7732782 to your computer and use it in GitHub Desktop.
Save h4cc/7732782 to your computer and use it in GitHub Desktop.
Very simple Makefile to deploy a existing symfony2 application. Using Doctrine ORM and MongoDB ODM for database. Inital usage: $ git clone https://exaple.com/project.git $ make permissions Deploying or Updating with database changes: $ make deploy $ make database
hello:
@echo "Hello! use other targets!"
deploy:
git reset --hard -q
git pull -q
rm -rf bin/
php composer.phar install --no-progress --no-dev -o --quiet
rm -rf app/cache/*
php app/console cache:warmup --env prod
permissions:
setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX app/cache app/logs
setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
database:
php app/console doctrine:mongodb:schema:create --quiet
php app/console doctrine:schema:update --force --quiet
@kissgyorgy
Copy link

.PHONY is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment