Skip to content

Latest commit

 

History

History
80 lines (48 loc) · 1.97 KB

README.md

File metadata and controls

80 lines (48 loc) · 1.97 KB

Traefik

A dynamic reverse proxy for containers. SSL is automatically configured using Let's Encrypt.

Access to the /jenkins admin site is IP restricted.

Special Note: Due to this commit not yet in a release, Traefik had to be built from source code.

Building Traefik from source

First install the GO dev environment following the instructions here.

Next, temporarily disable SELinux on CentOS 7 (otherwise docker volumes may get permission errors)

sudo setenforce 0

Clone the Traefik source code to /tmp

cd /tmp

git clone https://github.com/containous/traefik

Next create the latest docker image for Traefik using make:

cd /tmp/traefik

make image

Running the container

Make sure you are inside this repo

cd /home/yourname/src/traefik

First, create a empty acme.json file to hold acquired SSL certificates:

touch acme.json

chmod 600 acme.json

Second, setup a .htpasswd file using the instructions below

Setup admin user for dashboard

SKIP THIS if you are not using the web dashboard.

On Centos 7, install htpassword:

sudo yum install httpd-tools

Then generate a password file for user 'admin':

sudo htpasswd -c .htpasswd admin

I keep a password hint in a separate 'hint' file.

Start the Traefik container

./run.sh

Traefik web dashboard

A simple Angular JS web dashboard for traefik can be viewed here.

Warning: SSL is not enabled for the dashboard and admin password will go in the clear. The deprecated dashboard is for demo purposes, replace with Prometheus/Grafana in prod.

Note: The web dashboard is disabled if metrics are enabled.

Notes

Traefik container must run with --privileged to access docker unix socket.