14 docker compose initial commit

This commit is contained in:
Dominik
2024-05-10 17:53:43 +02:00
commit 277f8544ee
31 changed files with 1124 additions and 0 deletions

View File

100
traefik/config/traefik.yaml Normal file
View File

@@ -0,0 +1,100 @@
global:
checkNewVersion: false
sendAnonymousUsage: false
# -- (Optional) Change Log Level and Format here...
# - loglevels [DEBUG, INFO, WARNING, ERROR, CRITICAL]
# - format [common, json, logfmt]
# log:
# level: ERROR
# format: common
# filePath: /var/log/traefik/traefik.log
# -- (Optional) Enable Accesslog and change Format here...
# - format [common, json, logfmt]
# accesslog:
# format: common
# filePath: /var/log/traefik/access.log
# -- (Optional) Enable API and Dashboard here, don't do in production
api:
dashboard: true
insecure: true
# -- Change EntryPoints here...
entryPoints:
web:
address: :80
# -- (Optional) Redirect all HTTP to HTTPS
# http:
# redirections:
# entryPoint:
# to: websecure
# scheme: https
websecure:
address: :443
# -- (Optional) Add custom Entrypoint
# custom:
# address: :8080
# -- Configure your CertificateResolver here...
# certificatesResolvers:
# staging:
# acme:
# email: your-email@example.com
# storage: /etc/traefik/certs/acme.json
# caServer: "https://acme-staging-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"
# production:
# acme:
# email: your-email@example.com
# storage: /etc/traefik/certs/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"
certificatesResolvers:
dns-cloudflare:
acme:
email: test@example.com
storage: /etc/traefik/certs/acme.json
dnsChallenge:
provider: cloudflare
delayBeforeCheck: 0
# -- (Optional) Disable TLS Cert verification check
# serversTransport:
# 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:
docker:
# -- (Optional) Enable this, if you want to expose all containers automatically
exposedByDefault: false
file:
directory: /etc/traefik
watch: true

View File

@@ -0,0 +1,24 @@
networks:
traefik-network:
# https://doc.traefik.io/traefik/
services:
traefik:
image: docker.io/library/traefik:2.11.2
container_name: traefik
ports:
- 80:80
- 443:443
# -- (Optional) Enable Dashboard, don't do in production
- 8082:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./config:/etc/traefik
# -- (Optional) When using Cloudflare as Cert Resolver
environment:
- CF_API_EMAIL=xxx@example.com
- CF_DNS_API_TOKEN=xxx
# -- (Optional) When using a custom network
networks:
- traefik-network
restart: unless-stopped