02 Info

 

Damit Docker-Container von Traefik erkannt werden, müssen diese im gleichen Netz betrieben werden wie Traefik!

Der Container muss mit einem YAML-File, in dem Labels und das Network definiert sind, aufgesetzt werden

Beispiel YAML Docker Compose für Photoshow:

version: "2.1"
services:
  photoshow:
    image: lscr.io/linuxserver/photoshow:latest
    container_name: photoshow
    environment:
      - PUID=1001
      - PGID=1001
      - TZ=Europe/Zurich
    volumes:
      - /home/admin_ps/photoshow/Config:/config
      - /home/admin_ps/photoshow/Photos:/Pictures:ro
      - /home/admin_ps/photoshow//Thumbs:/Thumbs
    ports:
      - 2342:2342
    restart: unless-stopped
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.photoshow.entrypoints=http"
      - "traefik.http.routers.photoshow.rule=Host(`photoshow.loecker.ch`)"
      - "traefik.http.middlewares.photoshow-https-redirect.redirectscheme.scheme=https"
      - "traefik.http.routers.photoshow.middlewares=photoshow-https-redirect"
      - "traefik.http.routers.photoshow-secure.entrypoints=https"
      - "traefik.http.routers.photoshow-secure.rule=Host(`photoshow.loecker.ch`)"
      - "traefik.http.routers.photoshow-secure.tls=true"
      - "traefik.http.routers.photoshow-secure.tls.certresolver=http"
      - "traefik.http.routers.photoshow-secure.service=photoshow"
      - "traefik.http.services.photoshow.loadbalancer.server.port=2342"
      - "traefik.docker.network=proxy"
    networks:
      - proxy
networks:
  proxy:
    external: true

Version #2
Erstellt: 12 August 2022 12:31:59 von Admin
Zuletzt aktualisiert: 12 August 2022 12:46:59 von Admin

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.

Ok