Traefik - Can't connect via https

I am trying to run Traefik on a Raspberry Pi Docker Swarm (specifally following this guide https://github.com/openfaas/faas/blob/master/guide/traefik_integration.md from the OpenFaaS project) but have run into some trouble when actually trying to connect via https.

Specifically there are two issues:

1) When I connect to http://192.168.1.20/ui I am given the username / password prompt. However the details (unhashed password) generated by htpasswd and used in the below docker-compose.yml are not accepted.

2) Visting the https version (http://192.168.1.20/ui) does not connect at all. This is the same if I try to connect using the domain I have set in --acme.domains

When I explore /etc/ I can see that no /etc/traefik/ directory exists but should presumably be created so perhaps this is the root of my problem?

The relevant part of my docker-compose.yml looks like

traefik:
    image: traefik:v1.3
    command: -c --docker=true
        --docker.swarmmode=true
        --docker.domain=traefik
        --docker.watch=true
        --web=true
        --debug=true
        --defaultEntryPoints=https,http
        --acme=true
        --acme.domains='<my domain>'
        --acme.email=myemail@gmail.com
        --acme.ondemand=true
        --acme.onhostrule=true
        --acme.storage=/etc/traefik/acme/acme.json
        --entryPoints=Name:https Address::443 TLS
        --entryPoints=Name:http Address::80 Redirect.EntryPoint:https
    ports:
        - 80:80
        - 8080:8080
        - 443:443
    volumes:
        - "/var/run/docker.sock:/var/run/docker.sock"
        - "acme:/etc/traefik/acme"
    networks:
        - functions
    deploy:
        labels:
            - traefik.port=8080
            - traefik.frontend.rule=PathPrefix:/ui,/system,/function
            - traefik.frontend.auth.basic=user:password  <-- relevant credentials from htpasswd here
        restart_policy:
            condition: on-failure
            delay: 5s
            max_attempts: 20
            window: 380s
        placement:
            constraints: [node.role == manager]

volumes:
  acme:

Any help very much appreciated.

1 answer