Hey thanks for the reply. Yeah, I use that syntax in my file. I just used docker compose convert becasue I'm loading from ENV varibles so you could see how it is. The actual compose file looks like this
version: '3'
services:
reverse-proxy:
# The official v2 Traefik docker image
image: traefik:v2.8
# Enables the web UI and tells Traefik to listen to docker
command: --providers.docker
container_name: traefik
ports:
- "80:80"
- "444:443"
volumes:
# So that Traefik can listen to the Docker events
# TODO: Don't bind the full docker sock
- /var/run/docker.sock:/var/run/docker.sock
- type: bind
source: ./traefik.yml
target: /etc/traefik/traefik.yml
restart: always
labels:
- "traefik.http.routers.dashboard.rule=Host(`traefik.shorty.systems`)"
- "traefik.http.routers.dashboard.service=api@internal"
- "traefik.http.routers.dashboard.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.users=${user}:${pass}"
- "traefik.enable=true"
networks:
default:
name: traefik
Note no space before the name. I've not escaped the $'s in my .env file, but docker compose seems to be doing it fine, and it seesm traefik got it fine, from the debug logs.
Ok i figured it out. Apparently .env files in docker will convert $'s if and only if they have capital letters after them. As such most of my dollar signs were working, except for one, and escaping would be needed on just one. I was able to avoid this by wrapping my thing in single quotes.
Thanks