I want to go to https://app.mydomain.com in the browser and be redirected to a docker container running on :8080, on http. The docker container is running in network host mode. So curl localhost:8080
works.
My problem is, I still have to put the port :8080 in the browser, otherwise I get a 404. My second problem is, https doesn't work either! Visiting http://app.mydomain.com:8080 works!
I want to be typing in https://app.mydomain.com
and it'll take me to http://app.mydomain.com:8080
(even better if the port wasn't displayed but guess I can't do anything about that right??).
Routers:
http:
# So I should be able to use http-redirect for https -> http
middlewares:
http-redirect:
redirectScheme:
scheme: http
permanent: true
routers:
rule: "Host(`app.mydomain.com`)"
entryPoints: [web,websecure]
middlewares: [http-redirect]
service: app
tls:
certResolver: letsencrypt
Services:
dns:
loadBalancer:
servers:
- url: "http://localhost:8080"
What am I missing? I must be close...