diff --git a/traefik-dashboard/docker-compose.yml b/traefik-dashboard/docker-compose.yml index eb97cdb..4c3ec7a 100644 --- a/traefik-dashboard/docker-compose.yml +++ b/traefik-dashboard/docker-compose.yml @@ -1,35 +1,51 @@ services: + traefik_socket_proxy: + container_name: traefik_socket_proxy + image: ghcr.io/11notes/socket-proxy:2.1.3 + restart: unless-stopped + read_only: true + user: ${PUID}:${PGID} + environment: + TZ: ${TZ} + volumes: + - /run/docker.sock:/run/docker.sock:ro + - socket-proxy:/run/proxy + networks: + - frontend + traefik: container_name: traefik image: docker.io/library/traefik:v3.5.0 restart: unless-stopped + depends_on: + traefik_socket_proxy: + condition: service_healthy security_opt: - no-new-privileges:true secrets: - cf_api_token - env_file: .env labels: - traefik.enable=true - traefik.http.routers.traefik.entrypoints=web - - traefik.http.routers.traefik.rule=Host(`traefik.local.${DOMAIN_NAME}`) + - traefik.http.routers.traefik.rule=Host(`${TRAEFIK_DOMAIN}`) - traefik.http.middlewares.traefik-auth.basicauth.users=${TRAEFIK_DASHBOARD_CREDENTIALS} - traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https - traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https - traefik.http.routers.traefik.middlewares=traefik-https-redirect - traefik.http.routers.traefik-secure.entrypoints=websecure - - traefik.http.routers.traefik-secure.rule=Host(`traefik.local.${DOMAIN_NAME}`) + - traefik.http.routers.traefik-secure.rule=Host(`${TRAEFIK_DOMAIN}`) - traefik.http.routers.traefik-secure.middlewares=traefik-auth - traefik.http.routers.traefik-secure.service=api@internal environment: - CF_DNS_API_TOKEN_FILE=/run/secrets/cf_api_token - TRAEFIK_DASHBOARD_CREDENTIALS=${TRAEFIK_DASHBOARD_CREDENTIALS} volumes: - - ./data/traefik.yml:/traefik.yml:ro - - ./data/acme.json:/acme.json # chmod 600 - - ./data/config.yml:/config.yml:ro - - ./logs:/var/log/traefik + - ${APPDATA_PATH}/traefik/data/traefik.yml:/traefik.yml:ro + - ${APPDATA_PATH}/traefik/data/acme.json:/acme.json # chmod 600 + - ${APPDATA_PATH}/traefik/data/config.yml:/config.yml:ro + - ${APPDATA_PATH}/traefik/logs:/var/log/traefik - /etc/localtime:/etc/localtime:ro - - /var/run/docker.sock:/var/run/docker.sock:ro + - socket-proxy:/var/run ports: - 80:80 - 81:81 @@ -43,7 +59,9 @@ services: networks: frontend: external: true - secrets: cf_api_token: - file: ./cf_api_token.txt + file: ${APPDATA_PATH}/traefik/secrets/cf_api_token + +volumes: + socket-proxy: