Hello all!
I've recently moved to traefik from nginx, and I would like to run it inside a Docker container, using portainer.
Now, I have a basic setup done, and yet, the container always crashes with the error:
ERR Command error | error=command traefik error: read /etc/traefik/traefik.yml: is a directory
When I run it with normal docker on the same machine, it works just fine.
My configs are as follows:
docker-compose.yml:
---
services:
traefik:
image: "traefik:v3.4"
container_name: "traefik"
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik.yml:/etc/traefik/traefik.yml:ro
networks:
- traefik
restart: unless-stopped
networks:
traefik:
external: true
traefik.yml:
global:
checkNewVersion: true
sendAnonymousUsage: false
log:
level: DEBUG
api:
dashboard: true
insecure: true
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
asDefault: true
Before you ask, the docker compose file and the traefik static config file are both in the same directory, not in any subdirectories, I am certain the path is correct.
I'm looking forward to any help on the matter!