[Traefik | Docker] Impossible to reach API behind Traefik in Docker container (custom webapp)

Hello everyone !

i'm struggling with Traefik to reach my custom webapp who i deploy in production for the first time behind Traefik.

The first component i try to deploy is the API gateway with Websocket server.

My gateway have the port 8011
The socket : 8020

I've tried to go inside the Traefik container to see if i can reach the service with a wget and it works perfectly, but i can't access it from outside.

After multiple change and try i've got 404 error, just Timeout or 502 Gateway TimeOut

Here my current labels (Anonymized of course) for this container, if someone can help me, i'm really struggling right now :frowning:

labels:
      - "traefik.enable=true"
  
      # Router for the main API
      - "traefik.http.routers.apimywebapp.rule=Host(`api.mywebapp.mywebsite.fr`) && PathPrefix(`/api`)"
      - "traefik.http.routers.apimywebapp.entrypoints=websecure"
      - "traefik.http.routers.apimywebapp.tls.certresolver=myresolver"
      - "traefik.http.routers.apimywebapp.middlewares=mywebapp-https,mywebapp-headers,apimywebapp-stripprefix"
      - "traefik.http.middlewares.apimywebapp-stripprefix.stripprefix.prefixes=/api"
      - "traefik.http.routers.apimywebapp.service=mywebapp-backend"
      - "traefik.http.services.mywebapp-backend.loadbalancer.server.scheme=https"
      - "traefik.http.services.mywebapp-backend.loadbalancer.server.port=8011"
      
  
      # Middleware for HTTPS redirection and headers
      - "traefik.http.middlewares.apiracecontrol-https.redirectscheme.scheme=https"
      - "traefik.http.middlewares.apiracecontrol-headers.headers.stsSeconds=155520011"
  
      # Router for Socket.io (for the specific path `/socket.io/`)
      - "traefik.http.routers.apimywebappsock.rule=Host(`api.mywebapp.mywebsite.fr`) && PathPrefix(`/socket.io`)"
      - "traefik.http.routers.apimywebappsock.entrypoints=websecure"
      - "traefik.http.routers.apimywebappsock.tls.certresolver=myresolver"
      - "traefik.http.routers.apimywebappsock.service=mywebapp-backendsock"
      - "traefik.http.services.mywebapp-backendsock.loadbalancer.server.port=8020"

Share your full Traefik static and dynamic config, and docker-compose.yml if used.

Enable and check Traefik debug log (doc) and Traefik access log in JSON format (doc).