Skip to content

Instantly share code, notes, and snippets.

@icyleaf
Last active September 17, 2023 12:34
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save icyleaf/9f47504912366c6758a0fd2c6f719322 to your computer and use it in GitHub Desktop.
Save icyleaf/9f47504912366c6758a0fd2c6f719322 to your computer and use it in GitHub Desktop.
Access Synology DSM on public IP binded domain without port (traefik version)

Access Synology DSM on public IP binded domain without port (traefik version)

More detail to visit my blog: https://icyleaf.com <-- Not publish yet.

version: '3'
services:
reverse-proxy:
restart: unless-stopped
image: traefik:v2.4
ports:
- "5000:5000"
- "5001:5001"
- "80:80"
- "443:443"
volumes:
- ./traefik.yml:/traefik.yml:ro
- ./letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro
log:
level: INFO
api:
dashboard: true
insecure: true
serversTransport:
# skip verify self-sign cert of DSM
insecureSkipVerify: true
providers:
file:
filename: "traefik.yml"
entryPoints:
dsm:
address: ":5000"
dsmsecure:
address: ":5001"
web:
address: ":80"
websecure:
address: ":443"
## DYNAMIC CONFIGURATION
http:
routers:
dsmHttp:
rule: "Host(`dsm.example.com`)"
service: dsmHttp
entryPoints:
- dsm
dsmHttps:
rule: "Host(`dsm.example.com`)"
service: dsmHttps
entryPoints:
- dsmsecure
tls:
certResolver: letsencrypt-resolver
dsmPhotoHTTP:
rule: "Host(`dsm.example.com`)"
service: dsmPhotoHTTP
entryPoints:
- web
dsmPhotoHTTPS:
rule: "Host(`dsm.example.com`)"
service: dsmPhotoHTTPS
entryPoints:
- websecure
tls:
certResolver: letsencrypt-resolver
services:
dsmHTTP:
loadBalancer:
servers:
- url: "http://public_ip.example.com:5000/"
dsmHTTPS:
loadBalancer:
servers:
- url: "https://public_ip.example.com:5001/"
dsmPhotoHTTP:
loadBalancer:
servers:
- url: "http://public_ip.example.com:10080/"
dsmPhotoHTTPS:
loadBalancer:
servers:
- url: "https://public_ip.example.com:10443/"
certificatesResolvers:
letsencrypt-resolver:
acme:
caServer: https://acme-v02.api.letsencrypt.org/directory
#caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
email: "you@email.com"
storage: "/letsencrypt/acme.json"
httpChallenge:
entryPoint: web
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment