• nutomicA
    link
    fedilink
    arrow-up
    3
    ·
    5 years ago

    The frontend sends those requests to :443/pictshare, and on the server those requests are forwarded to the other Docker container on port 8537.

    • gix
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      5 years ago

      I’ve now got it working. For reference, below is my docker-compose with the traefik labels for each:

        lemmy:
          image: dessalines/lemmy:v0.6.17
          container_name: lemmy
          volumes:
            - ./lemmy.hjson:/config/config.hjson:ro
          labels:
            - "traefik.enable=true"
            - "traefik.frontend.rule=Host:gix.uk"
            - "traefik.port=8536"
        pictshare:
          image: hascheksolutions/pictshare:latest
          container_name: pictshare
          volumes:
            - /data/pictshare/data:/usr/share/nginx/html/data
          labels:
            - "traefik.enable=true"
            - "traefik.api.frontend.rule=Host:gix.uk;PathPrefixStrip:/pictshare"
            - "traefik.port=80"
      
      • nutomicA
        link
        fedilink
        arrow-up
        2
        ·
        5 years ago

        Cool! I dont understand how it uses https seeing as you put port 80, but I guess thats handled by the traefik config. Do you want to open a PR with this?

        • gix
          link
          fedilink
          arrow-up
          2
          ·
          5 years ago

          Slight typo on my end there - the port refers to the back end docker container, so it’s 8536 for lemmy, 80 for pictshare.

          I’d be happy to open a PR for it, but without existing config for either nginx or traefik in the standard docker-compose, I wonder if it would be better just to be included in the documentation somewhere?