thecreation / dockerize-traefik

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dockerize Traefik

Prerequisites

Up and Running

  1. Create a directory that will serve as the home for your docker services.
mkdir /data && cd /data
  1. Clone this repo into the newly created directory as "reverse-proxy".
git clone https://github.com/thecreation/dockerize-traefik.git && cd reverse-proxy
  1. Create .env file and modify the variables to fit your needs.
cp .env-example .env
vim .env

Update TRAEFIK_AUTH with the generated credentials below:

docker run \
  --entrypoint htpasswd \
  registry:latest -nb admin password

Fill the server ip to TRAEFIK_IPWHITELIST to restrict ip access.

  1. Create "acme.json" and update file permissions.
touch letsencrypt/acme.json && chmod 600 letsencrypt/acme.json
  1. Create the docker network.
docker network create reverse_proxy
  1. Spin up the service.
docker-compose up -d

done!

Web dashboard and ping

Access the links below in the browser

Troubleshooting and logging

Run the following command:

tail -f logs/accessLog.txt
tail -v logs/traefik.log

About