Route another port als 80 oder 443

I am trying to get a rails app running with traefik on front, this is working but I have some problems with webpack-dev-server , this normally runs using port 3035, so I need to open this port and route the request to the container running it.I add a new entryPoint:

 webpack:
    address: ":3035"
    http:
      redirections:
        entryPoint:
          scheme: https

and set the labels like this:

labels:
  - "traefik.http.routers.${PROJECT_NAME}-webpack.entrypoints=webpack"
  - "traefik.http.routers.${PROJECT_NAME}-webpack.rule=Host(project.test)"
  - "traefik.http.routers.${PROJECT_NAME}-webpack.service=${PROJECT_NAME}-webpack"
  - "traefik.http.routers.${PROJECT_NAME}-webpack.tls=true"
  - "traefik.http.services.${PROJECT_NAME}-webpack.loadbalancer.server.port=3035"
  - "traefik.http.routers.${PROJECT_NAME}-webpack.middlewares=${PROJECT_NAME}-webpack-headers"
  - "traefik.http.middlewares.${PROJECT_NAME}-webpack-headers.headers.accesscontrolalloworigin=origin-list-or-null"

it is not working, but not sure where is the error. Would be great if anyone could help

thanks

hello @elalemanyo

Did you also publish that port on the Docker level in the section ports?

Would you please be more specific in regards to what is not working?

Thank you,

1 Like

@jakubhajek sorry for the delay, I have not had time to keep trying.

Yes, that port is publish:

    ports:
      - "443:443"
      - "80:80"
      - "3035:3035"

For the moment I am getting a 404 for all request going to this port :man_shrugging:, not sure how I can check if traefik is working, and maybe the problem is another.

Thanks