Skip to content

Instantly share code, notes, and snippets.

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 lounagen/5ca2816077a785e0c082061a1ba3a3b3 to your computer and use it in GitHub Desktop.
Save lounagen/5ca2816077a785e0c082061a1ba3a3b3 to your computer and use it in GitHub Desktop.
Sample saltstack state to create a docker nginx-proxy bridge (https://github.com/jwilder/nginx-proxy)
# Sample saltstack state to create a docker nginx-proxy bridge
# See details for separate docker network interest on https://github.com/jwilder/nginx-proxy
# --subnet option set the subnet of this docker network (instead of random), to configure many hosts in the same way (iptables, ...)
# --opt com.docker.network.bridge.name option fix the real bridge name got from ```ip addr``` (instead of random name)
nginx-proxy-network:
cmd.run:
- names:
- docker network create -d bridge --subnet 172.28.0.0/16 --opt com.docker.network.bridge.name=nginx-proxy nginx-proxy
- unless: docker network list | grep nginx-proxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment