Dockerize Traefik
Prerequisites
Up and Running
- Create a directory that will serve as the home for your docker services.
mkdir /data && cd /data
- Clone this repo into the newly created directory as "reverse-proxy".
git clone https://github.com/thecreation/dockerize-traefik.git && cd reverse-proxy
- 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.
- Create "acme.json" and update file permissions.
touch letsencrypt/acme.json && chmod 600 letsencrypt/acme.json
- Create the docker network.
docker network create reverse_proxy
- 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