edit - ../docker - ../../compute
traefik
Docker Comopose Folder Structure
- docker (changes here require docker restart)
- traefik
- config.yaml (copy from below then update used to tweak to get good rating)
- traefik.yaml (copy from below then update)
- docker-compose (changes here traefik will pickup)
- get DNS edit API token from cloudflare see Traefikv3.3 yt-tc18:51
- get Traefik Dashboard Cred see Traefikv3.3 yt-tc21:22
- sudo apt install apache2-utils
-
echo $(htpasswd -nB admin) |
sed -e s/\$/\$\$/g |
- put string into .env
- create acme.json
- touch acme.json
- sudo chmod 600 acme.json
- setup proxy network
- sudo docker network create proxy
- sudo docker network list
- run
- sudo docker compose up -d
- check docker/traefik/logs for errors
- sudo docker stop traefik
The –force-recreate flag ensures that containers are recreated even if their configuration and image haven’t changed, guaranteeing that the newly built images are used. If you want to run in detached mode, add the -d flag:
sudo docker compose up --force-recreate -d