Hi all,
I'm learning Traefik since a week...sorry for newbie question
I'm trying to proxy my api (aspnet core app) but it seems that Traefik work only if I map api port to host.
Using the following docker-compose
file, Traefik responds 404
version: '3.4'
services:
reverse-proxy:
image: traefik:v2.0
command: --api.insecure=true --providers.docker
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
anaconda-api:
image: registry.gitlab.com/codiceplastico/nsagroup/anaconda.backend/core
depends_on:
- database
- migrator
labels:
- "traefik.port=80"
- "traefik.http.routers.anaconda-api.rule=Host(`anaconda.nsa.local`)"
but if I add ports 8081:80
to anaconda_api
service everything works as expected and I can invoke my api calling anaconda.nsa.local/health
endpoint.
What I'm missing?