Skip to content

Instantly share code, notes, and snippets.

@polikeiji
Created July 28, 2014 08:21
Show Gist options
  • Save polikeiji/dc39630eebf169333026 to your computer and use it in GitHub Desktop.
Save polikeiji/dc39630eebf169333026 to your computer and use it in GitHub Desktop.
gunicorn起動用のupstartのinitスクリプト
description "[APP NAME] API Server"
start on runlevel [2345]
stop on runlevel [016]
respawn
script
su - www
source /home/www/[APP NAME]/virtualenv/bin/activate
gunicorn -b 127.0.0.1:8000 -w 4 -u www --chdir /home/www/[APP NAME]/server/python --log-file /home/www/[APP NAME]/logs/error_log --pythonpath /home/www/[APP NAME]/server/python server:application
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment