85 lines
3.2 KiB
YAML
85 lines
3.2 KiB
YAML
version: "3.3"
|
|
|
|
services:
|
|
|
|
traefik:
|
|
image: "traefik:v2.10"
|
|
container_name: "traefik"
|
|
command:
|
|
- "--log.level=DEBUG"
|
|
- "--accesslog=true"
|
|
- "--accesslog.filePath=/logs/access.log"
|
|
- "--api.insecure=false"
|
|
- "--api.dashboard=true"
|
|
- "--providers.docker=true"
|
|
- "--providers.docker.exposedbydefault=false"
|
|
- "--entrypoints.websecure.address=:443"
|
|
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
|
|
#- "--certificatesresolvers.myresolver.acme.caserver=https://acme-staging-v02.api.letsencrypt.org/directory"
|
|
- "--certificatesresolvers.myresolver.acme.email=badctoxymoron@gmx.de"
|
|
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
|
|
ports:
|
|
- "443:443"
|
|
#- "8080:8080"
|
|
volumes:
|
|
- "./letsencrypt:/letsencrypt"
|
|
- "./traefik/logs:/logs"
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
# Make the traefik dashboard available under https://oxmox.root.sx/traefik/dashboard/
|
|
# For some reason it's slow when used this way. It's fast when exposed via port 8080 and api.insecure=true.
|
|
- "traefik.http.routers.traefik_api.rule=Host(`oxmox.root.sx`) && (PathPrefix(`/api`) || PathPrefix(`/traefik`))"
|
|
- "traefik.http.routers.traefik_api.entrypoints=websecure"
|
|
- "traefik.http.routers.traefik_api.tls.certresolver=myresolver"
|
|
- "traefik.http.routers.traefik_api.service=api@internal"
|
|
- "traefik.http.routers.traefik_api.middlewares=traefik_api_auth,traefik_api_strip"
|
|
- "traefik.http.middlewares.traefik_api_auth.basicauth.users=florian:$$apr1$$x/GrMMGU$$Dn7yVliaRFEwlW17SNh6s."
|
|
- "traefik.http.middlewares.traefik_api_strip.stripprefix.prefixes=/traefik/"
|
|
|
|
#whoami:
|
|
# image: "traefik/whoami"
|
|
# container_name: "simple-service"
|
|
# labels:
|
|
# - "traefik.enable=true"
|
|
# - "traefik.http.routers.whoami.rule=Host(`oxmox.root.sx`) && Path(`/whoami`)"
|
|
# - "traefik.http.routers.whoami.entrypoints=websecure"
|
|
# - "traefik.http.routers.whoami.tls.certresolver=myresolver"
|
|
|
|
#dashboard:
|
|
# image: "traefik/whoami"
|
|
# container_name: "dashboard-service"
|
|
# labels:
|
|
# - "traefik.enable=true"
|
|
# - "traefik.http.routers.dashboard.rule=Host(`oxmox.root.sx`) && PathPrefix(`/dashboard`)"
|
|
# - "traefik.http.routers.dashboard.entrypoints=websecure"
|
|
# - "traefik.http.routers.dashboard.tls.certresolver=myresolver"
|
|
|
|
#wireguard:
|
|
# image: lscr.io/linuxserver/wireguard:latest
|
|
# container_name: wireguard
|
|
# labels:
|
|
# - "traefik.enable=true"
|
|
# cap_add:
|
|
# - NET_ADMIN
|
|
# #- SYS_MODULE
|
|
# environment:
|
|
# - PUID=1000
|
|
# - PGID=1000
|
|
# - TZ=Europe/Berlin
|
|
# #- SERVERURL=wireguard.oxmox.root.sx #optional
|
|
# - SERVERPORT=51820 #optional
|
|
# - PEERS=1 #optional
|
|
# - PEERDNS=auto #optional
|
|
# - INTERNAL_SUBNET=10.42.23.0 #optional
|
|
# - ALLOWEDIPS=10.42.23.0/24 #optional
|
|
# - PERSISTENTKEEPALIVE_PEERS= #optional
|
|
# - LOG_CONFS=true #optional
|
|
# volumes:
|
|
# - ./wireguard:/config
|
|
# #- /lib/modules:/lib/modules #optional
|
|
# ports:
|
|
# - 51820:51820/udp
|
|
# sysctls:
|
|
# - net.ipv4.conf.all.src_valid_mark=1
|
|
# restart: unless-stopped
|