docker-traefik icon indicating copy to clipboard operation
docker-traefik copied to clipboard

Trying to add a thunderbird docker

Open gcraenen opened this issue 3 years ago • 1 comments

I'm adding a thunderbird docker to the t2-docker-compose and try to get this working.

Created a compose snippet as part of a larger docker-compose. When starting with traefik labels only pointing to http://server:ip this works but starts in a dir where I have to click vnc.html and click connect in the no-vnc screen.

When using traefiks addprefix labels to connect to http://server:ip/vnc.html?autoconnect=true I am getting:

Error response

Error code: 404

Message: File not found.

Error code explanation: HTTPStatus.NOT_FOUND - Nothing matches the given URI.

The maker of the docker suggested that I have to also enable websocket access in traefik for this docker, so I added some things to the traefik compse file:

  - --entryPoints.websocket.address=:444

and

  ports:
     - target: 444
        published: 444
        protocol: tcp
        mode: host

This is the docker-compose snippet I am using:

#Thunderbird
  thunderbird:
    image: ich777/thunderbird
    container_name: thunderbird
    restart: unless-stopped
    networks:
      - t2_proxy
    security_opt:
      - no-new-privileges:true
    #port:
    #  - 8080:8080
    volumes:
      - $DOCKERDIR/appdata/thunderbird:/thunderbird
    environment:
      UID: $PUID
      GID: $PGID
      UMASK: 000
      DATA_PERM: 770
      CUSTOM_RES_W: 1536
      CUSTOM_RES_H: 864
      THUNDERBIRD_V: latest
      THUNDERBIRD_LANG: en-US
      TZ: $TZ
    labels:
      - "traefik.enable=true"
      #HTTP Routers
      - "traefik.http.routers.thunderbird-rtr.entrypoints=https"
      #- "traefik.http.routers.thunderbird-websocket.entrypoints=websocket"
      - "traefik.http.routers.thunderbird-rtr.rule=Host(`thunderbird.$DOMAINNAME0`)"
      #- "traefik.http.routers.thunderbird-websocket.rule=Host(`thunderbird.$DOMAINNAME0`)"
      #Middlewares
      - "traefik.http.routers.thunderbird-rtr.middlewares=chain-authelia@file"
      #- "traefik.http.routers.thunderbird-rtr.middlewares=chain-authelia@file,add-thunderbird"
      #- "traefik.http.routers.thunderbird-websocket.middlewares=chain-no-auth@file"
      #- "traefik.http.middlewares.add-thunderbird.addPrefix.prefix=/vnc.html?autoconnect=true"
      #HTTP Services
      - "traefik.http.routers.thunderbird-rtr.service=thunderbird-svc"
      #- "traefik.http.routers.thunderbird-websocket.service=thunderbird-svc"
      - "traefik.http.services.thunderbird-svc.loadbalancer.server.port=8080"

When uncommenting the websocket parts in the thunderbird snippet and changing the middleware parts out for the addprefix lines it isn't working and I get the same error.

I'm probably not setting up the websocket parts right, but no clue how to do this the right way.

gcraenen avatar Sep 16 '21 15:09 gcraenen

Hi, did you by any chance get your WebSocket parts right? I'm finding myself in the same situation.

morganzero avatar Jan 21 '22 11:01 morganzero