Skip to content

Instantly share code, notes, and snippets.

@rbalazs
Created November 21, 2014 07:45
Show Gist options
  • Save rbalazs/22b1d8306849906886ed to your computer and use it in GitHub Desktop.
Save rbalazs/22b1d8306849906886ed to your computer and use it in GitHub Desktop.
Ahogyanagyi.hu DEPLY
from fabric.api import *
def deploy_from_version_control():
""" Sync """
with cd("/var/www/ahogyanagyi/"):
run("git add .")
run("git reset --hard")
run("git pull")
run("php composer.phar install")
run("php app/console cache:clear --env=prod --no-debug")
run("php app/console assetic:dump --env=prod --no-debug")
sudo("chmod 777 -R .")
run("ln -s /var/www/ftp/ahogyanagyi/kepek/ /var/www/ahogyanagyi/web/")
sudo("service varnish restart")
def update_schema():
""" Database """
with cd("/var/www/ahogyanagyi/"):
run("php app/console doctrine:schema:update --dump-sql")
run("php app/console doctrine:schema:update --force")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment