Last active
December 21, 2016 20:01
-
-
Save jgworks/f07cbb950a6fe475384a3e07a8fb160e to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
mkdir -p /etc/traefik/ | |
curl -L 'https://github.com/containous/traefik/releases/download/v1.1.2/traefik' > /usr/local/sbin/traefik | |
chmod +x /usr/local/sbin/traefik | |
# curl 'https://raw.githubusercontent.com/containous/traefik/master/traefik.sample.toml' > /etc/traefik/traefik.toml | |
cat > /usr/lib/systemd/system/traefik.service <<EOF | |
[Unit] | |
Description=traefik http proxy | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
EnvironmentFile=-/etc/sysconfig/traefik | |
Environment=GOMAXPROCS=2 | |
Restart=on-failure | |
ExecStart=/usr/local/sbin/traefik --configFile=/etc/traefik/traefik.toml | |
ExecReload=/bin/kill -HUP $MAINPID | |
KillSignal=SIGTERM | |
[Install] | |
WantedBy=multi-user.target | |
EOF | |
systemctl enable traefik | |
# systemctl start traefik |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment