Skip to content

scriptcie/traefik

Repository files navigation

Treafik for crash & compile projects

Since all our projects use docker compose as a way to develop and release our projects a natural reverse proxy to use is traefik.

This repo allows you to

Setting up traefik locally

Clone the repo

git clone git@github.com:scriptcie/traefik.git

Creating a docker network

docker network create traefik-proxy

Adding SSL certificates

Inspired by: https://github.com/Heziode/traefik-v2-https-ssl-localhost/blob/master/README.md

Run mkcert for your local certificates,

mkcert -cert-file data/certs/local-cert.pem -key-file data/certs/local-key.pem "localhost" "*.localhost" "docker.localhost" "*.docker.localhost" "domain.local" "*.domain.local" "traefik.localhost" "*.scriptcie.nl.localhost"
traefik  master ✗ mkcert -cert-file certs/local-cert.pem -key-file certs/local-key.pem "localhost" "*.localhost" "docker.localhost" "*.docker.localhost" "domain.local" "*.domain.local"

Created a new certificate valid for the following names 📜
 - "localhost"
 - "*.localhost"
   Warning: many browsers don't support second-level wildcards like "*.localhost" ⚠️
 - "docker.localhost"
 - "*.docker.localhost"
 - "domain.local"
 - "*.domain.local"

Reminder: X.509 wildcards only go one level deep, so this won't match a.b.localhost ℹ️

The certificate is at "certs/local-cert.pem" and the key at "certs/local-key.pem" ✅

It will expire on 2 June 2026 🗓

Start traefik

docker compose up -d traefik

Accessing the traefik dashboard

Go to https://traefik.scriptcie.nl.localhost and sign in with:

Username: scriptcie
Password: hoi

change these credentials by chaning the traefik.http.middlewares.auth.basicauth.users key in docker-compose.yml

echo $(htpasswd -nb user password) | sed -e s/\\$/\\$\\$/g

** Check logs

docker compose logs traefik -t -f --tail=100

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages