@gavargas there is a docker-compose snippet above dated Mar 2016, which indicates exactly what needs to be done.
Also something I just realised from https://github.com/rancher/rancher/issues/3505 is that since Rancher 1.2 you can simply add the following global config to your HAProxy:
frontend http-frontend
bind *:80
mode http
redirect scheme https code 301 if !{ ssl_fc }
This is also mentioned here Trouble setting up http-to-https redirection
I’ve tested this out and it works. I didn’t need to do any special selector rules.