Commit 92a0e393 by John Jarvis

initial forum config for supervisor

parent d56155bd
...@@ -11,10 +11,17 @@ forum_gem_bin: "{{ forum_gem_root }}/bin" ...@@ -11,10 +11,17 @@ forum_gem_bin: "{{ forum_gem_root }}/bin"
forum_path: "{{ forum_code_dir }}/bin:{{ forum_rbenv_bin }}:{{ forum_rbenv_shims }}:{{ forum_gem_bin }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" forum_path: "{{ forum_code_dir }}/bin:{{ forum_rbenv_bin }}:{{ forum_rbenv_shims }}:{{ forum_gem_bin }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
forum_environment: forum_environment:
RBENV_ROOT: $forum_rbenv_root RBENV_ROOT: "{{ forum_rbenv_root }}"
GEM_HOME: $forum_gem_root GEM_HOME: "{{ forum_gem_root }}"
GEM_PATH: $forum_gem_root GEM_PATH: "{{ forum_gem_root }}"
PATH: $forum_path PATH: "{{ forum_path }}"
MONGOHQ_USER: "{{ forum_mongo_user }}"
MONGOHQ_PASS: "{{ forum_mongo_password }}"
RACK_ENV: "{{ forum_rack_env }}"
SINATRA_ENV: "{{ forum_sinatra_env }}"
API_KEY: "{{ forum_api_key }}"
SEARCH_SERVER: "{{ forum_elasticsearch_url }}"
MONGOHQ_URL: "{{ forum_mongo_url }}"
forum_user: "forum" forum_user: "forum"
forum_ruby_version: "1.9.3-p448" forum_ruby_version: "1.9.3-p448"
......
# {{ ansible_managed }} # {{ ansible_managed }}
{% for name,value in forum_environment.items() %}
# {% if value %}
# This file is sourced in .bashrc. export {{ name }}="{{ value }}"
# The environment variables are used by the cs_comments_service {% endif %}
# to configure itself at start-time. {% endfor %}
# eval "$(rbenv init -)"
export MONGOHQ_USER="{{ forum_mongo_user }}"
export MONGOHQ_PASS="{{ forum_mongo_password }}"
export RACK_ENV="{{ forum_rack_env }}"
export SINATRA_ENV="{{ forum_sinatra_env }}"
export API_KEY="{{ forum_api_key }}"
export SEARCH_SERVER="{{ forum_elasticsearch_url }}"
export MONGOHQ_URL="{{ forum_mongo_url }}"
\ No newline at end of file
[program:forum]
command={{ forum_rbenv_shims }}/ruby app.rb
priority=999
startsecs = 5
redirect_stderr = True
autostart=False
user={{ common_web_user }}
...@@ -4,5 +4,5 @@ start on runlevel [2345] ...@@ -4,5 +4,5 @@ start on runlevel [2345]
stop on runlevel [!2345] stop on runlevel [!2345]
respawn respawn
setuid {{ supervisor_user }}
exec /usr/local/bin/supervisord --nodaemon --configuration {{ supervisor_cfg }} exec {{ supervisor_venv_dir }}/bin/supervisord --nodaemon --configuration {{ supervisor_cfg }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment