# HG changeset patch # User ymh # Date 1472774515 -7200 # Node ID 9b019ac3b791a5694f1a7000ec8c2f5cd0707cf9 # Parent 14b5345bbb17c1f32d7f616466fdd176eea9fa42 correct fabfile diff -r 14b5345bbb17 -r 9b019ac3b791 sbin/sync/config.py.tmpl --- a/sbin/sync/config.py.tmpl Thu Sep 01 14:19:16 2016 +0200 +++ b/sbin/sync/config.py.tmpl Fri Sep 02 02:01:55 2016 +0200 @@ -1,24 +1,33 @@ from fabric.api import env from random import choice -env.hosts = ['iri@web.iri.centrepompidou.fr'] +env.hosts = ['@'] -env.web_group = 'www-data' -env.folders = ['../run/log', 'static/media'] +env.web_group = 'iri' +env.folders = ['log', 'static/media'] -env.repos = {'iconolab' : {'repo':"/Users/ymh/dev/projects/iconolab", 'src_root':'src', 'requirements': 'src/requirements/prod.txt', 'python_version': '3.5'}} +env.repos = {'iconolab' : {'repo':"", 'src_root':'src', 'requirements': 'requirements/prod.txt', 'python_version': '3.5'}} env.base_export_path = "/tmp" env.export_prefix = "iconolab" env.key = 'iconolab' env.remote_path = { - 'web':"/iridata/www/ldt/", - 'src':"/Users/ymh/dev/tmp/testfab/src", - 'virtualenv':"/iridata/virtualenv/ldt", + 'web':"/etc/www/iconolab/", + 'src':"/etc/www/iconolab", + 'virtualenv':"/srv/virtualenv/iconolab", 'build_export':"/tmp/build", 'pythonpath' : ['/etc/www/iconolab'] } +#env.remote_path = { +# 'web':"/var/www/iconolab/", +# 'src':"/Users/ymh/dev/tmp/testfab/src", +# 'virtualenv':"/Users/ymh/dev/tmp/testiconolab/virtualenv/iconolab", +# 'build_export':"/tmp/build", +# 'pythonpath' : ['/etc/www/iconolab'] +#} + + env.platform_web_module = "iconolab" env.remote_baseline_venv = "" @@ -44,7 +53,9 @@ ] } env.web_relaunch_cmd = "supervisorctl restart iconolab" - +env.settings = "iconolab_settings" +env.admin_cmd = "django-admin" +env.check_folder_access = False env.config = { 'web': { @@ -62,5 +73,3 @@ 'secret_key' : ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)]), }, } - -env.check_folder_access = True diff -r 14b5345bbb17 -r 9b019ac3b791 sbin/sync/fabfile.py --- a/sbin/sync/fabfile.py Thu Sep 01 14:19:16 2016 +0200 +++ b/sbin/sync/fabfile.py Fri Sep 02 02:01:55 2016 +0200 @@ -47,7 +47,7 @@ install_build(res_trans[0], env.remote_path['virtualenv']) # remove build + untared folder run('rm -fr "%s" "%s" ' % (res_trans[0], res_trans[0][0:-7])) - clean_export_folder(export_path) + clean_export_folder(env.remote_path['build_export']) relaunch_server() @task