Fixed vagrant recipe to start honcho properly

This commit is contained in:
Maxim Kulkin 2013-10-17 17:10:56 +04:00
parent 799911dcff
commit 24d6969f01

View File

@ -1,5 +1,6 @@
package 'redis-server'
package 'python-pip'
package 'tmux'
bash 'Install python dependencies' do
code 'pip install -r requirements.txt'
@ -7,10 +8,14 @@ bash 'Install python dependencies' do
end
bash 'Run application' do
code 'killall /usr/bin/python'
code 'echo "webui: gunicorn --error-logfile /tmp/webui.log --log-level debug ostack_validator.webui:app --bind 0.0.0.0:8000" > ProcfileHonchoLocal'
code 'echo "worker: celery worker --app=ostack_validator.celery:app" >> ProcfileHonchoLocal'
code 'honcho -f ProcfileHonchoLocal start &'
code <<-EOS
echo "webui: gunicorn --log-level debug ostack_validator.webui:app --bind 0.0.0.0:8000" > ProcfileHonchoLocal
echo "worker: celery worker --app=ostack_validator.celery:app" >> ProcfileHonchoLocal
if ! tmux has-session -t dev; then
tmux new-session -d -s dev "honcho -f ProcfileHonchoLocal start"
fi
EOS
user 'vagrant'
cwd '/vagrant'
end