would like to use docker-compose and traefik to expose the service with DUCK_DNS challeage.
would like to use docker-compose and traefik to expose the service with DUCK_DNS challeage.
logs from traefik here: .
2024-07-13T23:21:48Z ERR error="accept tcp [::]:80: use of closed network connection" entryPointName=web
2024-07-13T23:21:48Z ERR error="close tcp [::]:80: use of closed network connection" entryPointName=web
2024-07-13T23:21:48Z ERR error="accept tcp [::]:8080: use of closed network connection" entryPointName=traefik
2024-07-13T23:21:48Z ERR error="accept tcp [::]:443: use of closed network connection" entryPointName=websecure
2024-07-13T23:21:48Z ERR error="close tcp [::]:8080: use of closed network connection" entryPointName=traefik
2024-07-13T23:21:48Z ERR error="close tcp [::]:443: use of closed network connection" entryPointName=websecure
2024-07-13T23:23:50Z ERR error="middleware "gzip@docker" does not exist" entryPointName=websecure routerName=alist@docker
2024-07-13T23:23:50Z ERR error="middleware "gzip@docker" does not exist" entryPointName=websecure routerName=jellyseerr@docker
2024-07-13T23:23:50Z ERR error="middleware "gzip@docker" does not exist" entryPointName=websecure routerName=moviepilot@docker
2024-07-13T23:23:50Z ERR error="middleware "gzip@docker" does not exist" entryPointName=websecure routerName=qbittorrent@docker
2024-07-13T23:23:51Z ERR Error renewing certificate from LE: {opda.duckdns.org } error="error: one or more domains had a problem:\n[opda.duckdns.org] [opda.duckdns.org] acme: error presenting token: request to change TXT record for DuckDNS returned the following result (KO) this does not match expectation (OK) used ur
DOCKER Compose .yaml paste here:
version: "3.8"
services:
traefik:
image: "traefik:v3.0"
container_name: "traefik"
restart: "unless-stopped"
command:
- "--api=true"
- "--api.dashboard=true"
- "--api.insecure=true"
- "--ping=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--certificatesresolvers.myresolver.acme.dnschallenge=true"
- "--certificatesresolvers.myresolver.acme.dnschallenge.provider=duckdns"
- "--certificatesresolvers.myresolver.acme.email=xx2125940@qq.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
logging:
driver: "json-file"
options:
max-size: "1m"
healthcheck:
test: ["CMD-SHELL", "wget -q --spider --proxy off localhost:8080/ping || exit 1"]
interval: 3s
retries: 10
ports:
- "80:80"
- "443:443"
- "8080:8080"
environment:
- "DUCKDNS_TOKEN=*****************-45cb-9ff9-be54f1242ebc"
volumes:
- "./letsencrypt:/letsencrypt"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik-dashboard.tls.certresolver=myresolver"
- "traefik.http.routers.traefik-dashboard.tls.domains[0].main=*.xxx.duckdns.org"
- "traefik.http.routers.traefik-dashboard.tls.domains[0].sans=xxx.duckdns.org"
- "traefik.http.routers.traefik-dashboard.tls=true"
- "traefik.http.routers.traefik-dashboard.rule=Host(`tr.xxx.duckdns.org`)"
- "traefik.http.routers.traefik-dashboard.entrypoints=websecure"
- "traefik.http.routers.traefik-dashboard.service=dashboard@internal"
- "traefik.http.routers.traefik-dashboard-api.tls=true"
- "traefik.http.routers.traefik-dashboard-api.rule=Host(`tr.xxx.duckdns.org`) && PathPrefix(`/api`)"
- "traefik.http.routers.traefik-dashboard-api.entrypoints=websecure"
- "traefik.http.routers.traefik-dashboard-api.service=api@internal"
- "traefik.http.middlewares.gzip.compress=true"
- "traefik.http.routers.traefik-dashboard.middlewares=gzip@docker"
- "traefik.http.routers.traefik-dashboard-api.middlewares=gzip@docker"
dashy:
# To build from source, replace 'image: lissy93/dashy' with 'build: .'
# build: .
image: lissy93/dashy
container_name: Dashy
hostname: Dashy
# Pass in your config file below, by specifying the path on your host machine
volumes:
- /dkprog/dashy/my-conf.yml:/app/public/conf.yml
- /dkprog/dashy/item-icons:/app/public/item-icons
ports:
- 4000:80
# Set any environmental variables
environment:
- NODE_ENV=production
# Specify your user ID and group ID. You can find this by running id -u
and id -g
- UID=0
- GID=0
# Specify restart policy
restart: unless-stopped
# Configure healthchecks
healthcheck:
test: ['CMD', 'node', '/app/services/healthcheck']
interval: 1m30s
timeout: 10s
retries: 3
start_period: 40s
labels:
- "traefik.enable=true"
- "traefik.http.routers.dashy.rule=Host(da.xxx.duckdns.org
)"
- "traefik.http.routers.dashy.entrypoints=websecure"
- "traefik.http.routers.dashy.tls.certresolver=myresolver"
- "traefik.http.routers.dashy.middlewares=gzip@docker"
networks:
default:
driver: bridge
name: traefik_proxy
Use 3 backticks before and after code/config to improve readability and keep spacing.
use of closed network connection
is an error that sometimes occurs during Traefik container shutdown, usually it can be ignored.
It seems you try to assign gzip
middleware to a router, but it has not been declared.