Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
. socorro-virtualenv/bin/activate
# "-bootstrap-expect 1" because there's only one consul server
consul agent -bootstrap-expect 1 -server -data-dir=./consul-data/
# socorro/collector is the consul prefix, "socorro collector" runs collector
envconsul -upcase=false socorro/collector socorro collector
# when you change this key, envconsul restarts collector w/ new port
curl -X PUT -d '12345' http://localhost:8500/v1/kv/socorro/collector/web_server__port
# for production, use uwsgi
curl -X PUT -d 'socorro.webapi.servers.ApacheModWSGI' http://localhost:8500/v1/kv/socorro/collector/web_server__wsgi_server_class
# note, specifying "-once" because we don't want automatic restarts on this service
envconsul -once -upcase=false -prefix socorro/collector \
uwsgi -H $VENV -w wsgi.collector -s /var/run/uwsgi/collector.wsgi
# see to connect nginx to this socket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment