Install a supervisor job for run-dev.

The development server will automatically start after provisioning finishes.

(imported from commit 6be3d954d9049acd0360189b07b1481756b69eef)
This commit is contained in:
Luke Faraone 2015-08-18 19:20:28 -07:00 committed by Tim Abbott
parent 7e78dc4ca1
commit 1e7d7c0b71
2 changed files with 13 additions and 0 deletions

View File

@ -27,6 +27,7 @@ APT_DEPENDENCIES = {
"hunspell-en-us", "hunspell-en-us",
"nodejs", "nodejs",
"python-virtualenv", "python-virtualenv",
"supervisor",
"git", "git",
] ]
} }
@ -116,3 +117,7 @@ sh.postgres_init_db()
sh.do_destroy_rebuild_database() sh.do_destroy_rebuild_database()
sh.postgres_init_test_db() sh.postgres_init_test_db()
sh.do_destroy_rebuild_test_database() 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")

View File

@ -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/