Skip to content

Instantly share code, notes, and snippets.

@pranavcode
Created April 1, 2019 14:47
Show Gist options
  • Save pranavcode/30becf02d055cb469f3c6550736edc45 to your computer and use it in GitHub Desktop.
Save pranavcode/30becf02d055cb469f3c6550736edc45 to your computer and use it in GitHub Desktop.
Velotio - HashiCorp Consul Part 2 - Configuration of Django App with Consul KV using Consul's HTTP API
# Flag to run Django app in debug mode
curl -X PUT -d 'True' consul_server:8500/v1/kv/web/debug
# Dynamic entries into Django app configuration
# to denote allowed set of hosts
curl -X PUT -d 'localhost, 33.10.0.100' consul_server:8500/v1/kv/web/allowed_hosts
# Dynamic entries into Django app configuration
# to denote installed apps
curl -X PUT -d 'tweetapp' consul_server:8500/v1/kv/web/installed_apps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment