# HG changeset patch # User ymh # Date 1349718071 -7200 # Node ID 9f8db096d8f7ffb35dcea31d37e7358af21815f7 # Parent 87272c6be104e08df03e45b6ebf8e01bbcf3ac2c update config with src file diff -r 87272c6be104 -r 9f8db096d8f7 README.markdown --- a/README.markdown Mon Oct 08 19:24:10 2012 +0200 +++ b/README.markdown Mon Oct 08 19:41:11 2012 +0200 @@ -48,7 +48,7 @@ Cette commande va créer un fichier de configuration minimal sur le serveur web à partir des informations renseignées dans le fichier config.py de l'étape précédente. 4- Sur le serveur distant: -* édition du fichier de configuration `/theend/config.py`. +* édition du fichier de configuration `/theend/config.py`. * configuration du serveur web * du process uwsgi et de leur communication. @@ -57,7 +57,7 @@ [program:theend] command=/bin/uwsgi --yaml /etc/uwsgi/theend.yml - directory= + directory= user=www-data autostart=true autorestart=true @@ -73,9 +73,9 @@ virtualenv: processes: 5 logto: /var/log/uwsgi/theend.log - chdir: /theend + chdir: /theend module: django_wsgi - pythonpath: + pythonpath: On peut remarquer ici qu'on utilise les socket unix pour faire communiquer le serveur web et le serveur uwsgi. diff -r 87272c6be104 -r 9f8db096d8f7 sbin/sync/config.py.tmpl --- a/sbin/sync/config.py.tmpl Mon Oct 08 19:24:10 2012 +0200 +++ b/sbin/sync/config.py.tmpl Mon Oct 08 19:41:11 2012 +0200 @@ -8,6 +8,7 @@ env.base_export_path = "" env.export_prefix = "theend" env.remote_web_path = "" +env.remote_src_path = "" env.platform_web_module = "theend" env.remote_virtualenv_path = "" env.remote_venv_export_path = "" @@ -16,16 +17,22 @@ "+ core", "P .htpasswd", "P .htaccess", - "P theend/.htaccess", - "P theend/config.py", - "P theend/modwsgi.wsgi", "P robots.txt", "P env/***", "P log/***", "P index/***", - "P static/media/***", + "P static/media/***", "P crossdomain.xml", ] +env.src_rsync_filters = [ + "+ core", + "P theend/.htaccess", + "P theend/config.py", + "P theend/modwsgi.wsgi", + "P log/***", + "P index/***", +] + env.venv_rsync_filters = [ "+ core", ] diff -r 87272c6be104 -r 9f8db096d8f7 sbin/sync/fabfile.py --- a/sbin/sync/fabfile.py Mon Oct 08 19:24:10 2012 +0200 +++ b/sbin/sync/fabfile.py Mon Oct 08 19:41:11 2012 +0200 @@ -132,6 +132,12 @@ print("do_sync_web with version %s and path %s" % (version,export_path)) web_path = os.path.join(export_path,"web/") rsync_export(web_path, env.remote_web_path, env.web_rsync_filters) + +def do_sync_src(version, export_path): + print("do_sync_web with version %s and path %s" % (version,export_path)) + src_path = os.path.join(export_path,"src/") + rsync_export(src_path, env.remote_src_path, env.src_rsync_filters) + def check_folder_access(): print("Check folder access") @@ -157,6 +163,7 @@ print(green("sync web with version %s" % version)) export_path = export_version(version) do_sync_web(version, export_path) + do_sync_src(version, export_path) create_config(export_path) clean_export_folder(export_path) relaunch_server()