Created
November 21, 2014 07:45
-
-
Save rbalazs/22b1d8306849906886ed to your computer and use it in GitHub Desktop.
Ahogyanagyi.hu DEPLY
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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