|
|
|
@ -24,7 +24,7 @@ config = { |
|
|
|
'manage_py_path' : '', |
|
|
|
'manage_py_path' : '', |
|
|
|
'settings_path' : 'skillbox', |
|
|
|
'settings_path' : 'skillbox', |
|
|
|
'repository_type' : 'git', |
|
|
|
'repository_type' : 'git', |
|
|
|
'repository_url' : 'git@gitlab.com:django-webapp/skillbox.git', |
|
|
|
'repository_url' : 'git@gitlab.com:skillbox/go.skillbox.ru.git', |
|
|
|
'aws_key' : '', |
|
|
|
'aws_key' : '', |
|
|
|
'aws_secret' : '' |
|
|
|
'aws_secret' : '' |
|
|
|
} |
|
|
|
} |
|
|
|
@ -257,8 +257,8 @@ def fetch(): |
|
|
|
|
|
|
|
|
|
|
|
with virtualenv(): |
|
|
|
with virtualenv(): |
|
|
|
#manage('migrate --run-syncdb --noinput') |
|
|
|
#manage('migrate --run-syncdb --noinput') |
|
|
|
#manage('migrate --all') |
|
|
|
#manage('migrate') |
|
|
|
manage("migrate --noinput") |
|
|
|
#manage("migrate --noinput") |
|
|
|
manage("collectstatic -v 0 --noinput") |
|
|
|
manage("collectstatic -v 0 --noinput") |
|
|
|
#upload_template_and_reload('django_settings') |
|
|
|
#upload_template_and_reload('django_settings') |
|
|
|
#upload_template_and_reload('gunicorn') |
|
|
|
#upload_template_and_reload('gunicorn') |
|
|
|
@ -271,11 +271,13 @@ def create(): |
|
|
|
""" |
|
|
|
""" |
|
|
|
Stages the application on the server |
|
|
|
Stages the application on the server |
|
|
|
""" |
|
|
|
""" |
|
|
|
sudo('chown %s /var' % env.user) |
|
|
|
sudo('rm -r %s -f' % env.project_path) |
|
|
|
|
|
|
|
sudo('chown %s /var' % 'www-data') |
|
|
|
with cd('/var'): |
|
|
|
with cd('/var'): |
|
|
|
run('mkdir -p www') |
|
|
|
run('mkdir -p www') |
|
|
|
with cd('/var/www'): |
|
|
|
with cd('/var/www'): |
|
|
|
run('%s clone %s %s' %(env.repository_type, env.repository_url, env.project_path)) |
|
|
|
run('%s clone %s %s' %(env.repository_type, env.repository_url, env.project_path)) |
|
|
|
|
|
|
|
sudo('ln -s /var/www/media %s' % env.project_path) |
|
|
|
|
|
|
|
|
|
|
|
with cd(env.project_path): |
|
|
|
with cd(env.project_path): |
|
|
|
run("virtualenv -p python3 env --distribute") |
|
|
|
run("virtualenv -p python3 env --distribute") |
|
|
|
@ -291,8 +293,8 @@ def create(): |
|
|
|
upload_template_and_reload('supervisor') |
|
|
|
upload_template_and_reload('supervisor') |
|
|
|
|
|
|
|
|
|
|
|
with virtualenv(): |
|
|
|
with virtualenv(): |
|
|
|
manage('migrate --run-syncdb --noinput') |
|
|
|
#manage('migrate --run-syncdb --noinput') |
|
|
|
#manage('migrate --all') |
|
|
|
#manage('migrate --list') |
|
|
|
#manage("migrate --noinput") |
|
|
|
#manage("migrate --noinput") |
|
|
|
manage("collectstatic -v 0 --noinput") |
|
|
|
manage("collectstatic -v 0 --noinput") |
|
|
|
|
|
|
|
|
|
|
|
|