From 1e7d7c0b71cbb4a9e5861f9fbfc57a2bce804633 Mon Sep 17 00:00:00 2001 From: Luke Faraone Date: Tue, 18 Aug 2015 19:20:28 -0700 Subject: [PATCH] Install a supervisor job for run-dev. The development server will automatically start after provisioning finishes. (imported from commit 6be3d954d9049acd0360189b07b1481756b69eef) --- provision.py | 5 +++++ tools/provision/zulip-dev.conf | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 tools/provision/zulip-dev.conf diff --git a/provision.py b/provision.py index 2217a718c6..70d7df7922 100644 --- a/provision.py +++ b/provision.py @@ -27,6 +27,7 @@ APT_DEPENDENCIES = { "hunspell-en-us", "nodejs", "python-virtualenv", + "supervisor", "git", ] } @@ -116,3 +117,7 @@ sh.postgres_init_db() sh.do_destroy_rebuild_database() sh.postgres_init_test_db() sh.do_destroy_rebuild_test_database() + +with sh.sudo: + sh.cp(os.path.join(ZULIP_PATH, "tools", "provision", "zulip-dev.conf"), "/etc/supervisor/conf.d/zulip-dev.conf") + sh.service("supervisor", "restart") diff --git a/tools/provision/zulip-dev.conf b/tools/provision/zulip-dev.conf new file mode 100644 index 0000000000..77e19b1ff0 --- /dev/null +++ b/tools/provision/zulip-dev.conf @@ -0,0 +1,8 @@ +; on Debian squeeze, place me in /etc/supervisor/conf.d/zulip.conf + +[program:zulip-dev] +; The VM is behind NAT (right, right?); we listen on all interfaces so port mapping works correctly in Vagrant +command=bash -c "source /srv/zulip-venv/bin/activate && /srv/zulip/tools/run-dev.py --interface=''" +user=vagrant +redirect_stderr=true +directory=/srv/zulip/