From b7ece75cb5e8edcb67e386d65424fe669712af98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20Mart=C3=ADn?= Date: Thu, 23 May 2013 12:44:09 +0200 Subject: [PATCH] Added supervisor conf --- config/production/app.supervisor.conf | 8 ++++++++ config/production/install.sh | 4 ++++ 2 files changed, 12 insertions(+) create mode 100644 config/production/app.supervisor.conf diff --git a/config/production/app.supervisor.conf b/config/production/app.supervisor.conf new file mode 100644 index 0000000..915bf0c --- /dev/null +++ b/config/production/app.supervisor.conf @@ -0,0 +1,8 @@ +[program:gunicorn] +command = /home/app/virtualenv/bin/python /home/app/app/manage.py run_gunicorn -w 4 -k gevent +directory = /home/app/app +user = app +autostart = true +autorestart = true +stdout_logfile = /var/log/supervisor/gunicorn.log +stderr_logfile = /var/log/supervisor/gunicorn_err.log diff --git a/config/production/install.sh b/config/production/install.sh index e655b00..49cadc0 100644 --- a/config/production/install.sh +++ b/config/production/install.sh @@ -25,6 +25,8 @@ pacman -S git --noconfirm echo "=> Installing supervisor" pacman -S supervisor --noconfirm +systemctl start supervisord +systemctl enable supervisord echo "=> Installing nodejs and dependencies" pacman -S nodejs --noconfirm @@ -45,3 +47,5 @@ su - app -c "echo 'source .environment' > .bash_profile" echo "[REMEMBER!]" echo " - Create ssh keypair for the app user." echo " - Configure sudo to let app user execute the maintenance scripts." +echo " - Configure supervisor to include the app configuration." +echo " - Configure nginx to include the app configuration."