I am at the point to where I am not sure I can see the forest due to the trees!
I can get other sites to work just fine with traefikā¦it just seems to be these two at the moment.
Any input would be greatly appreciatedā¦afraid to say how long I have been working on this.
when I go to proxmox I am getting āconnection refusedā and for truenas I am getting āYour connection is not private net::ERR_CERT_AUTHORITY_INVALIDā
Here is my compose fileā¦
services:
traefik:
image: traefik:latest
container_name: traefik
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
traefik:
ipv4_address: 192.168.69.5
ports:
- 80:80
- 443:443
# - 443:443/tcp # Uncomment if you want HTTP3
# - 443:443/udp # Uncomment if you want HTTP3
environment:
NAMECOM_API_TOKEN: ${NAMECOM_API_TOKEN} # if using .env
NAMECOM_USERNAME: ${NAMECOM_USERNAME}
TRAEFIK_DASHBOARD_CREDENTIALS: ${TRAEFIK_DASHBOARD_CREDENTIALS}
env_file: .env # use .env
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik/config/traefik.yml:/traefik.yml:ro
- ./traefik/config/acme.json:/acme.json
- ./traefik/log:/var/log/traefik
- ./traefik/config.yml:/config.yml:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=http"
- "traefik.http.routers.traefik.rule=Host(`traefik-dashboard.local.domain.com`)"
- "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=https"
- "traefik.http.routers.traefik-secure.rule=Host(`traefik-dashboard.local.domain.com`)"
- "traefik.http.routers.traefik-secure.middlewares=traefik-auth"
- "traefik.http.routers.traefik-secure.tls=true"
- "traefik.http.routers.traefik-secure.tls.certresolver=namedotcom"
- "traefik.http.routers.traefik-secure.tls.domains[0].main=local.domain.com"
- "traefik.http.routers.traefik-secure.tls.domains[0].sans=*.local.domain.com"
- "traefik.http.routers.traefik-secure.service=api@internal"
###########################################################################
traefik.yml
api:
dashboard: true
debug: true
entryPoints:
http:
address: ":80"
http:
redirections:
entryPoint:
to: https
scheme: https
https:
address: ":443"
serversTransport:
insecureSkipVerify: true
providers:
docker:
endpoint: "unix:///var/run/docker.sock"
exposedByDefault: false
file:
filename: /config.yml
certificatesResolvers:
namedotcom:
acme:
email: dakers88@gmail.com
storage: /acme.json
caServer: https://acme-v02.api.letsencrypt.org/directory # prod (default)
#caServer: https://acme-staging-v02.api.letsencrypt.org/directory # staging
dnsChallenge:
provider: namedotcom
#disablePropagationCheck: true # uncomment this if you have issues pulling certificates through cloudflare, By setting this flag to true disables the need to wait for the propagation of the TXT record to all authoritative name servers.
#delayBeforeCheck: 60s # uncomment along with disablePropagationCheck if needed to ensure the TXT record is ready before verification is attempted
resolvers:
- "1.1.1.1:53"
- "1.0.0.1:53"
# Log level INFO|DEBUG|ERROR
log:
level: INFO
filePath: "/var/log/traefik/traefik.log"
#format: json
accessLog:
filePath: "/var/log/traefik/access.log"
#format: json
###########################################################################
config.yml
###########################################################################
http:
serversTransports:
insecuretransport:
insecureSkipVerify: true
middlewares:
default-headers:
headers:
frameDeny: true
browserXssFilter: true
contentTypeNosniff: true
forceSTSHeader: true
stsIncludeSubdomains: true
stsPreload: true
stsSeconds: 15552000
customFrameOptionsValue: SAMEORIGIN
customRequestHeaders:
X-Forwarded-Proto: https
https-redirectscheme:
redirectScheme:
scheme: https
permanent: true
default-whitelist:
ipWhiteList:
sourceRange:
#- "10.0.0.0/8"
#- "192.168.0.0/16"
#- "172.16.0.0/12"
- "172.31.1.0/24"
###########################################################################
routers:
portainer:
entryPoints:
- "https"
rule: "Host(`portainer.local.domain.com`)"
middlewares:
- default-headers
- https-redirectscheme
tls: {}
service: portainer
proxmox:
entryPoints:
- "https"
rule: "Host(`pve.local.domain.com`)"
middlewares:
- default-headers
- https-redirectscheme
tls: {}
service: proxmox
nas1:
entryPoints:
- "https"
rule: "Host(`nas1.local.domain.com`)"
middlewares:
- default-headers
- https-redirectscheme
tls: {}
service: nas1
scale:
entryPoints:
- "https"
rule: "Host(`scale.local.domain.com`)"
middlewares:
- default-headers
- https-redirectscheme
tls: {}
service: scale
###########################################################################
services:
portainer:
loadBalancer:
servers:
- url: "https://172.31.1.25:9443"
passHostHeader: true
serversTransport: insecuretransport
proxmox:
loadBalancer:
servers:
- url: "https://172.31.1.23:8006"
passHostHeader: true
serversTransport: insecuretransport
nas1:
loadBalancer:
servers:
- url: "https://172.31.1.21:443"
passHostHeader: true
serversTransport: insecuretransport
scale:
loadBalancer:
servers:
- url: "https://172.31.1.26"
passHostHeader: true
serversTransport: insecuretransport