# HG changeset patch # User ymh # Date 1361550698 -3600 # Node ID bc05135e80500b483d66159eccbd0194f6851e37 # Parent 35eb0cbadae07322f5fd0dc45b5eb17a6b01501b correct remote path name add env example diff -r 35eb0cbadae0 -r bc05135e8050 conf/config.py.tmpl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/conf/config.py.tmpl Fri Feb 22 17:31:38 2013 +0100 @@ -0,0 +1,64 @@ +from fabric.api import env +from random import choice + +env.hosts = ['iri@web.iri.centrepompidou.fr'] + +env.web_group = 'www-data' +env.folders = ['../run/log', 'static/media'] + +env.repos = {'web' : "/Users/ymh/dev/workspace/egonomy"} +env.base_export_path = "~/tmp" +env.export_prefix = "egonomy" + +env.remote_path = { + 'web':"/iridata/www/ldt/", + 'src':"/Users/ymh/dev/tmp/testfab/src", + 'virtualenv':"/iridata/virtualenv/ldt", + 'build_export':"/iridata/users/iri/tmp/build", + 'venv_export':"/iridata/users/iri/tmp/venv", +} + +env.platform_web_module = "egonomy" +env.remote_baseline_venv = "/iridata/virtualenv/baseline2.7" + +env.rsync_filters = { + 'src' : [ + "P .htpasswd", + "P .htaccess", + "P egonomy/config.py", + ], + 'web': [ + "+ core", + "P .htpasswd", + "P .htaccess", + "P robots.txt", + "P env/***", + "P log/***", + "P index/***", + "P static/media/***", + "P crossdomain.xml", + ], + 'venv': [ + "+ core", + ] +} +env.web_relaunch_cmd = "supervisorctl restart egonomy" + + +env.config = { + 'web': { + 'base_url': "/", + 'web_url': 'http://egonomy.iri-resesarch.org', + 'db_engine':'postgresql_psycopg2', + 'db_name':'platform', + 'db_user': 'iriuser', + 'db_password': '', + 'db_host': 'sql.iri.centrepompidou.fr', + 'db_port': 5432, + 'haystack_url' : 'http://localhost:9200', + 'haystack_index' : 'egonomy', + 'log_file' : env.remote_path['web'] + '/log/log.txt', + 'secret_key' : ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)]), + }, +} + diff -r 35eb0cbadae0 -r bc05135e8050 src/fablib/core.py --- a/src/fablib/core.py Thu Feb 21 23:44:15 2013 +0100 +++ b/src/fablib/core.py Fri Feb 22 17:31:38 2013 +0100 @@ -118,9 +118,9 @@ def sync_build(path): print("Sync build %s" % path) - with cd(env.remote_path['ldt_base']): + with cd(env.remote_path['build_export']): filename = os.path.basename(path) - res_trans = put(path, os.path.join(env.remote_path['ldt_base'], filename)) + res_trans = put(path, os.path.join(env.remote_path['build_export'], filename)) print("Sync build %s to %s" % (path,repr(res_trans))) return res_trans