Last active
August 6, 2019 18:23
-
-
Save notpushkin/b3bf86e05abaeae13b3ed96c037d0bea to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/bash | |
# Based on https://dockerswarm.rocks/traefik/ | |
# You have to have a docker swarm set up beforehand, try https://dockerswarm.rocks/ for an easy guide | |
read -p 'Domain: ' -rei "${DOMAIN:-$(hostname)}" DOMAIN; export DOMAIN | |
read -p 'Email: ' -rei "${EMAIL}" EMAIL; export EMAIL | |
read -p 'Traefik username: ' -rei "${USERNAME:-admin}" USERNAME; export USERNAME | |
HASHED_PASSWORD="$(openssl passwd -apr1)"; export HASHED_PASSWORD | |
read -p 'Consul replicas: ' -rei "${CONSUL_REPLICAS:-0}" CONSUL_REPLICAS; export CONSUL_REPLICAS | |
read -p 'Traefik replicas: ' -rei "${TRAEFIK_REPLICAS:-1}" TRAEFIK_REPLICAS; export TRAEFIK_REPLICAS | |
curl -fsSL 'https://dockerswarm.rocks/traefik.yml' -o traefik.yml | |
docker stack deploy -c traefik.yml traefik-consul |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment