示例#1
0
    def __init__(self):
        super(DjangoDeploy, self).__init__()
        required_envs([
            'host_string'
        ])

        self.gunicorn = GunicornDeploy(release_path=env.remote_release_path)
示例#2
0
    def __init__(self):
        super(DjangoDeploy, self).__init__()
        required_envs([
            'host_string'
        ])

        self.gunicorn = GunicornDeploy(release_path=env.remote_release_path)
示例#3
0
class DjangoDeploy(object):
    def __init__(self):
        super(DjangoDeploy, self).__init__()
        required_envs([
            'host_string'
        ])

        self.gunicorn = GunicornDeploy(release_path=env.remote_release_path)


    def deploy(self):
        puts("running django deploy")
        self.collect_static()
        self.gunicorn.deploy()

    def collect_static(self):
        puts("Collecting static files")
        run('{0}/bin/python {1}/manage.py collectstatic --noinput'.format(env.remote_virtualenv_path,
                                                                          env.remote_current_path))

    def status(self):
        self.gunicorn.status()