blob: f1d74d721f13435655e6108df821f9dd5673130a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
"""subweb deployment package.
Always prefix a task with the appropriate setup.
Examples:
$ fab setups.stage deploy
$ fab setups.production helpers.id
$ fab setups.prod helpers.load_fixture:fixtures/flatpages.json
"""
from fabric.api import *
from fabfile import helpers
from fabfile import setups
@task
def deploy():
"""Deploys the project.
Updates the sources, links the appropriate settings, collects the static
files and synchronizes/migrates the database.
Loading fixtures needs to be done manually.
"""
helpers.update_project()
helpers.install_requirements()
helpers.link_settings()
helpers.collect_static()
helpers.manage('supervisor stop gunicorn')
helpers.syncdb()
helpers.migrate()
helpers.manage('supervisor start gunicorn')
@task
def supervisor():
"""Access to the supervisor shell.
"""
helpers.manage('supervisor shell')
|