Created
May 14, 2017 08:31
-
-
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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