fix: dns-challenge
This commit is contained in:
parent
adf4eb1ffb
commit
373f94535f
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.env
|
@ -12,6 +12,8 @@ services:
|
||||
- "traefik.http.routers.gitea.entrypoints=websecure"
|
||||
- "traefik.http.routers.gitea.tls=true"
|
||||
- "traefik.http.routers.gitea.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.gitea.tls.domains[0].main=esin.io"
|
||||
- "traefik.http.routers.gitea.tls.domains[0].sans=*.esin.io"
|
||||
- "traefik.http.routers.gitea.middlewares=gitea-mw"
|
||||
- "traefik.http.middlewares.gitea-mw.compress=true"
|
||||
- "traefik.http.middlewares.gitea-mw.compress.excludedcontenttypes=text/event-stream"
|
||||
@ -23,8 +25,10 @@ services:
|
||||
external_links:
|
||||
- postgresql
|
||||
networks:
|
||||
- traefik
|
||||
- database
|
||||
traefik:
|
||||
priority: 1000
|
||||
database:
|
||||
priority: 100
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
|
@ -3,38 +3,52 @@ version: "3.9"
|
||||
services:
|
||||
reverse-proxy:
|
||||
image: traefik:v2.5
|
||||
restart: always
|
||||
command:
|
||||
- --entrypoints.web.address=:80
|
||||
- --entrypoints.websecure.address=:443
|
||||
- "--global.sendanonymoususage=false"
|
||||
- "--global.checknewversion=false"
|
||||
# EntryPoints
|
||||
- "--entrypoints.web.address=:80"
|
||||
- "--entrypoints.websecure.address=:443"
|
||||
# Global HTTP -> HTTPS
|
||||
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
|
||||
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
|
||||
# Enable dashboard
|
||||
- --api.dashboard=true
|
||||
- --providers.docker.exposedByDefault=false
|
||||
- --ping
|
||||
- "--api.dashboard=true"
|
||||
- "--ping"
|
||||
# Provider docker
|
||||
- "--providers.docker.watch=true"
|
||||
- "--providers.docker.exposedByDefault=false"
|
||||
# Provider file
|
||||
- "--providers.file.watch=true"
|
||||
- "--providers.file.directory=/etc/traefik"
|
||||
# SSL configuration
|
||||
- --certificatesresolvers.letsencrypt.acme.email=hi@esin.io
|
||||
- --certificatesresolvers.letsencrypt.acme.storage=/etc/acme/acme.json
|
||||
- --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web
|
||||
- --log.filePath=/var/log/traefik.log
|
||||
- --log.format=json
|
||||
- --log.level=INFO
|
||||
- --accessLog.filepath=/var/log/access.log
|
||||
- --accessLog.format=json
|
||||
- --accessLog.bufferingsize=100
|
||||
- "--certificatesresolvers.letsencrypt.acme.dnschallenge=true"
|
||||
- "--certificatesresolvers.letsencrypt.acme.dnschallenge.provider=linode"
|
||||
- "--certificatesresolvers.letsencrypt.acme.email=${ACME_EMAIL}"
|
||||
- "--certificatesresolvers.letsencrypt.acme.storage=/etc/acme/acme.json"
|
||||
#- --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web
|
||||
- "--log.filePath=/var/log/traefik.log"
|
||||
- "--log.format=json"
|
||||
- "--log.level=INFO"
|
||||
- "--accessLog.filepath=/var/log/access.log"
|
||||
- "--accessLog.format=json"
|
||||
- "--accessLog.bufferingsize=100"
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
environment:
|
||||
- "TZ=Asia/Shanghai"
|
||||
- LINODE_TOKEN=${LINODE_TOKEN}
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.dashboard.entrypoints=websecure"
|
||||
- "traefik.http.routers.dashboard.rule=Host(`traefik.esin.io`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
|
||||
- "traefik.http.routers.dashboard.service=api@internal"
|
||||
- "traefik.http.routers.dashboard.rule=Host(`traefik.esin.io`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
|
||||
- "traefik.http.routers.dashboard.tls=true"
|
||||
- "traefik.http.routers.dashboard.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.routers.dashboard.tls.domains[0].main=esin.io"
|
||||
- "traefik.http.routers.dashboard.tls.domains[0].sans=*.esin.io"
|
||||
- "traefik.http.routers.dashboard.middlewares=dashboard-auth"
|
||||
- "traefik.http.middlewares.dashboard.compress=true"
|
||||
- "traefik.http.middlewares.dashboard.compress.excludedcontenttypes=text/event-stream"
|
||||
|
Loading…
x
Reference in New Issue
Block a user