Skip to content

Instantly share code, notes, and snippets.

@mholt
Forked from j-mcnally/Caddyfile
Created January 17, 2016 00:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mholt/aba8bccc2d0939548b14 to your computer and use it in GitHub Desktop.
Save mholt/aba8bccc2d0939548b14 to your computer and use it in GitHub Desktop.
Caddyfile - Example
config_server "https://etcd.local:2379"
service users {
endpoint: "/users",
proxy: "{{services.users.ip}}:{{services.users.port}}"
}
# In this example 'services.users' would be a directory with a json key for every user service container / application.
# Using this we could template the proxy and any other information in the services block, and it would just work with caddy.
# As keys come and go caddy would just change where it sends traffic.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment