To run the current version I’m using a bootstraper and an init script to ensure the service is running. Is there things I should add/adjust to keep it running with current version?
Works with Ubuntu 12.04 + and is located at /etc/init/hypothesis.conf
#
# Annotator Upstart script
#
# file: /etc/init/hypothesis.conf
# Gist: https://gist.github.com/WebPlatformDocs/1ba5b980b52303b62acf
#
# Thanks to:
# - https://lukedrummond.net/2014/02/django-with-prefix-nginxgunicorndjango/
# - http://albertoconnor.ca/blog/2011/Sep/15/hosting-django-under-different-locations
#
description "Hypothesis server"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [!2345]
respawn
setuid renoirb
setgid deployment
script
cd /srv/webplatform/h
exec ./service.sh >> /var/log/webplatform/hypothesis.log 2>&1
end script
h.ini
Is the basic production.ini file with our own configs such as:
[app:main]
use: egg:h
# Hex characters in this format (not the real secret)
api.secret: ffffffff-aaaa-3333-4444-111111111111
#16 long Hex characters
auth.wpd.client_id: 1111111111111111
#64 long Hex characters (not a real secret)
auth.wpd.client_secret: 24f5ae0631a31a27d67ac20a6f9722fcd87271d729f0c9f531d7bc4a89db3fb
[server:main]
use: egg:gunicorn
worker_class: gevent
host: 127.0.0.1
port: 5000
To run the current version I’m using a bootstraper and an init script to ensure the service is running. Is there things I should add/adjust to keep it running with current version?
Our deployment configuration files are mirrored in this gist
Targeted server stack
Annotator Upstart script (runner)
This is the runner that is called by init.
The file is located at the root of the project checkout as
service.sh
.Annotator Upstart script
Works with Ubuntu 12.04 + and is located at
/etc/init/hypothesis.conf
h.ini
Is the basic
production.ini
file with our own configs such as: