mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-25 01:34:36 +01:00
Merge pull request #498 from ChristianLempa/487-update-traefik-template
updated traefik boilerplates
This commit is contained in:
commit
ccc0de467e
@ -6,21 +6,19 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
- 443:443
|
- 443:443
|
||||||
# -- (Optional) Enable Dashboard, don't do in production
|
# --> (Optional) Enable Dashboard, don't do in production
|
||||||
# - 8080:8080
|
# - 8080:8080
|
||||||
|
# <--
|
||||||
volumes:
|
volumes:
|
||||||
- /run/docker.sock:/run/docker.sock:ro
|
- /run/docker.sock:/run/docker.sock:ro
|
||||||
- ./config/traefik.yaml:/etc/traefik/traefik.yaml:ro
|
- ./config/traefik.yaml:/etc/traefik/traefik.yaml:ro
|
||||||
- ./config/conf.d/:/etc/traefik/conf.d/:ro
|
|
||||||
- ./data/certs/:/var/traefik/certs/:rw
|
- ./data/certs/:/var/traefik/certs/:rw
|
||||||
# -- (Optional) When using Cloudflare as Cert Resolver
|
- ./config/conf.d/:/etc/traefik/conf.d/:ro
|
||||||
# environment:
|
environment:
|
||||||
# - CF_DNS_API_TOKEN=your-cloudflare-api-token
|
- CF_DNS_API_TOKEN=your-cloudflare-api-token # <-- Change this to your Cloudflare API Token
|
||||||
# -- (Optional) When using a custom network
|
networks:
|
||||||
# networks:
|
- frontend
|
||||||
# - your-traefik-network
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
# -- (Optional) When using a custom network
|
networks:
|
||||||
# networks:
|
frontend:
|
||||||
# your-traefik-network:
|
external: true # <-- (Optional) Change this to false if you want to create a new network
|
||||||
# external: true
|
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
http:
|
|
||||||
routers:
|
|
||||||
your-local-router:
|
|
||||||
rule: "Host(`your-local-service.your-domain.com`) && PathPrefix(`/`)"
|
|
||||||
service: your-local-service
|
|
||||||
priority: 1000
|
|
||||||
entryPoints:
|
|
||||||
- web
|
|
||||||
# (optional) Permanent Redirect to HTTPS
|
|
||||||
# - websecure
|
|
||||||
|
|
||||||
services:
|
|
||||||
your-local-service:
|
|
||||||
loadBalancer:
|
|
||||||
servers:
|
|
||||||
- url: "http://your-local-service:port"
|
|
@ -0,0 +1,16 @@
|
|||||||
|
http:
|
||||||
|
# -- Change Router Configuration here...
|
||||||
|
routers:
|
||||||
|
your-local-router:
|
||||||
|
rule: "Host(`your-local-service.your-domain.com`)" # <-- Change Rules here...
|
||||||
|
service: your-local-service # <-- Change Service Name here...
|
||||||
|
priority: 1000 # <-- (Optional) Change Routing Priority here...
|
||||||
|
entryPoints:
|
||||||
|
- web, websecure
|
||||||
|
|
||||||
|
# -- Change Service Configuration here...
|
||||||
|
services:
|
||||||
|
your-local-service: # <-- Change Service Name here...
|
||||||
|
loadBalancer:
|
||||||
|
servers:
|
||||||
|
- url: "http://your-local-service:port" # <-- Change Target Service URL here...
|
@ -2,93 +2,57 @@ global:
|
|||||||
checkNewVersion: false
|
checkNewVersion: false
|
||||||
sendAnonymousUsage: false
|
sendAnonymousUsage: false
|
||||||
|
|
||||||
# -- (Optional) Change log level and format here ...
|
# --> (Optional) Change log level and format here ...
|
||||||
# - level: [TRACE, DEBUG, INFO, WARN, ERROR, FATAL]
|
# - level: [TRACE, DEBUG, INFO, WARN, ERROR, FATAL]
|
||||||
# - format: [common, json]
|
|
||||||
# log:
|
# log:
|
||||||
# level: ERROR
|
# level: ERROR
|
||||||
# format: common
|
# <--
|
||||||
# filePath: /var/log/traefik/traefik.log
|
|
||||||
|
|
||||||
# -- (Optional) Enable accesslog and change format here ...
|
# --> (Optional) Enable accesslog here ...
|
||||||
# - format: [common, json]
|
# accesslog: {}
|
||||||
# accesslog:
|
# <--
|
||||||
# format: common
|
|
||||||
# filePath: /var/log/traefik/access.log
|
|
||||||
|
|
||||||
# -- (Optional) Enable API and Dashboard here, don't do in production
|
# --> (Optional) Enable API and Dashboard here, don't do in production
|
||||||
# api:
|
# api:
|
||||||
# dashboard: true
|
# dashboard: true
|
||||||
# disableDashboardAd: true
|
|
||||||
# insecure: true
|
# insecure: true
|
||||||
|
# <--
|
||||||
|
|
||||||
# -- Change EntryPoints here...
|
# -- Change EntryPoints here...
|
||||||
entryPoints:
|
entryPoints:
|
||||||
web:
|
web:
|
||||||
address: :80
|
address: :80
|
||||||
# -- (Optional) Redirect all HTTP to HTTPS
|
# --> (Optional) Redirect all HTTP to HTTPS
|
||||||
# http:
|
# http:
|
||||||
# redirections:
|
# redirections:
|
||||||
# entryPoint:
|
# entryPoint:
|
||||||
# to: websecure
|
# to: websecure
|
||||||
# scheme: https
|
# scheme: https
|
||||||
|
# <--
|
||||||
websecure:
|
websecure:
|
||||||
address: :443
|
address: :443
|
||||||
# -- (Optional) Add custom Entrypoint
|
|
||||||
# custom:
|
|
||||||
# address: :8081
|
|
||||||
|
|
||||||
# -- Configure your CertificateResolver here...
|
# -- Configure your CertificateResolver here...
|
||||||
# certificatesResolvers:
|
certificatesResolvers:
|
||||||
# cloudflare-staging:
|
cloudflare:
|
||||||
# acme:
|
acme:
|
||||||
# email: your-email@example.com
|
email: your-email@example.com # <-- Change this to your email
|
||||||
# storage: /var/traefik/certs/cloudflare-acme.json
|
storage: /var/traefik/certs/cloudflare-acme.json
|
||||||
# caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
|
caServer: "https://acme-v02.api.letsencrypt.org/directory"
|
||||||
# -- (Optional) Remove this section, when using DNS Challenge
|
dnsChallenge:
|
||||||
# httpChallenge:
|
provider: cloudflare # <-- (Optional) Change this to your DNS provider
|
||||||
# entryPoint: web
|
resolvers:
|
||||||
# -- (Optional) Configure DNS Challenge
|
- "1.1.1.1:53"
|
||||||
# dnsChallenge:
|
- "8.8.8.8:53"
|
||||||
# provider: your-resolver (e.g. cloudflare)
|
|
||||||
# resolvers:
|
|
||||||
# - "1.1.1.1:53"
|
|
||||||
# - "8.8.8.8:53"
|
|
||||||
# cloudflare:
|
|
||||||
# acme:
|
|
||||||
# email: your-email@example.com
|
|
||||||
# storage: /var/traefik/certs/cloudflare-acme.json
|
|
||||||
# caServer: "https://acme-v02.api.letsencrypt.org/directory"
|
|
||||||
# -- (Optional) Remove this section, when using DNS Challenge
|
|
||||||
# httpChallenge:
|
|
||||||
# entryPoint: web
|
|
||||||
# -- (Optional) Configure DNS Challenge
|
|
||||||
# dnsChallenge:
|
|
||||||
# provider: your-resolver (e.g. cloudflare)
|
|
||||||
# resolvers:
|
|
||||||
# - "1.1.1.1:53"
|
|
||||||
# - "8.8.8.8:53"
|
|
||||||
|
|
||||||
# -- (Optional) Disable TLS Cert verification check
|
# --> (Optional) Disable TLS Cert verification check
|
||||||
# serversTransport:
|
# serversTransport:
|
||||||
# insecureSkipVerify: true
|
# insecureSkipVerify: true
|
||||||
|
# <--
|
||||||
# -- (Optional) Overwrite Default Certificates
|
|
||||||
# tls:
|
|
||||||
# stores:
|
|
||||||
# default:
|
|
||||||
# defaultCertificate:
|
|
||||||
# certFile: /etc/traefik/certs/cert.pem
|
|
||||||
# keyFile: /etc/traefik/certs/cert-key.pem
|
|
||||||
# -- (Optional) Disable TLS version 1.0 and 1.1
|
|
||||||
# options:
|
|
||||||
# default:
|
|
||||||
# minVersion: VersionTLS12
|
|
||||||
|
|
||||||
providers:
|
providers:
|
||||||
docker:
|
docker:
|
||||||
# -- (Optional) Enable this, if you want to expose all containers automatically
|
exposedByDefault: false # <-- (Optional) Change this to true if you want to expose all services
|
||||||
exposedByDefault: false
|
|
||||||
file:
|
file:
|
||||||
directory: /etc/traefik
|
directory: /etc/traefik
|
||||||
watch: true
|
watch: true
|
||||||
|
Loading…
Reference in New Issue
Block a user