Hi,
I run Traefik on AWS ECS with discovery, working good so far.
Now I want to migrate middleware and router settings from docker labels to config file, but I cant get it working (http 404).
I also tried with exposedByDefault=true
and without traefik.enable
.
What am I missing?
Working:
#traefik.yaml
api:
dashboard: true
insecure: false
entryPoints:
web:
address: ":80"
log:
format: common
level: DEBUG
noColor: true
ping: {}
providers:
ecs:
clusters:
- arn:aws:ecs:eu-central-1:xxxx
exposedByDefault: false
region: eu-central-1
#Docker Labels:
"traefik.enable": "true",
"traefik.http.middlewares.auth.basicauth.users": "test:xxx",
"traefik.http.routers.test.entrypoints": "web",
"traefik.http.routers.test.middlewares": "auth",
"traefik.http.routers.test.service": "my-test-service-test@ecs",
"traefik.http.routers.test.rule": "Host(`test.mydomain.net`)",
Now Working
#traefik.yaml
api:
dashboard: true
insecure: false
entryPoints:
web:
address: ":80"
http:
routers:
test:
entryPoints:
- web
middlewares:
- auth # (also tried auth@file)
rule: "Host(`test.mydomain.net`)"
service: my-test-service-test@ecs
middlewares:
auth:
basicAuth:
users:
- "test:xxx"
log:
format: common
level: DEBUG
noColor: true
ping: {}
providers:
ecs:
clusters:
- arn:aws:ecs:eu-central-1:xxxx
exposedByDefault: false
region: eu-central-1
#Docker Labels:
"traefik.enable": "true"