初始提交
This commit is contained in:
commit
009bd2e76b
33
conf.d/purearthsupplies.yml
Normal file
33
conf.d/purearthsupplies.yml
Normal file
@ -0,0 +1,33 @@
|
||||
http:
|
||||
routers:
|
||||
main-https:
|
||||
rule: &host_rule "Host(`purearthsupplies.com`) || Host(`www.purearthsupplies.com`)"
|
||||
entryPoints:
|
||||
- websecure
|
||||
service: main-service
|
||||
tls:
|
||||
certResolver: myresolver
|
||||
|
||||
main-http-redirect:
|
||||
rule: *host_rule
|
||||
entryPoints:
|
||||
- web
|
||||
middlewares:
|
||||
- redirect-to-https
|
||||
service: noop
|
||||
|
||||
services:
|
||||
main-service:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://107.174.127.105:3000"
|
||||
noop:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: "http://127.0.0.1:65535" # 占位用,无实际后端,仅用于HTTP跳转
|
||||
|
||||
middlewares:
|
||||
redirect-to-https:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
permanent: true
|
||||
20
docker-compose.yml
Normal file
20
docker-compose.yml
Normal file
@ -0,0 +1,20 @@
|
||||
services:
|
||||
traefik:
|
||||
# The official v3 Traefik docker image
|
||||
image: traefik:v3.4
|
||||
container_name: traefik
|
||||
restart: always
|
||||
# Enables the web UI and tells Traefik to listen to docker
|
||||
command: --api.insecure=true --providers.docker
|
||||
ports:
|
||||
# The HTTP port
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
# The Web UI (enabled by --api.insecure=true)
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
# So that Traefik can listen to the Docker events
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./traefik.yml:/etc/traefik/traefik.yml:ro
|
||||
- ./conf.d:/etc/traefik/conf.d:ro
|
||||
- ./acme.json:/etc/traefik/acme.json
|
||||
24
traefik.yml
Normal file
24
traefik.yml
Normal file
@ -0,0 +1,24 @@
|
||||
entryPoints:
|
||||
web:
|
||||
address: ":80"
|
||||
websecure:
|
||||
address: ":443"
|
||||
|
||||
api:
|
||||
dashboard: true
|
||||
insecure: true # 生产环境建议关闭
|
||||
|
||||
providers:
|
||||
docker:
|
||||
exposedByDefault: false
|
||||
file:
|
||||
directory: /etc/traefik/conf.d
|
||||
watch: true
|
||||
|
||||
certificatesResolvers:
|
||||
myresolver:
|
||||
acme:
|
||||
email: support@jingrow.com
|
||||
storage: acme.json
|
||||
httpChallenge:
|
||||
entryPoint: web
|
||||
Loading…
x
Reference in New Issue
Block a user