mirror of
https://github.com/michivonah/docker.git
synced 2025-12-22 20:36:27 +01:00
add traefik example configuration
This commit is contained in:
parent
7138bae1dc
commit
4d03b31f1e
2 changed files with 69 additions and 0 deletions
46
traefik/config/traefik.yaml
Normal file
46
traefik/config/traefik.yaml
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
---
|
||||
global:
|
||||
checkNewVersion: false
|
||||
sendAnonymousUsage: false
|
||||
# Dashboard should be disabled in production
|
||||
api:
|
||||
dashboard: true
|
||||
insecure: true
|
||||
entryPoints:
|
||||
http:
|
||||
address: :80
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: https
|
||||
scheme: https
|
||||
|
||||
https:
|
||||
address: :443
|
||||
|
||||
traefik:
|
||||
address: :8080
|
||||
|
||||
certificatesResolvers:
|
||||
staging:
|
||||
acme:
|
||||
email: you@example.com
|
||||
storage: /etc/traefik/certs/acme.json
|
||||
caServer: https://acme-staging-v02.api.letsencrypt.org/directory
|
||||
httpChallenge:
|
||||
entryPoint: http
|
||||
production:
|
||||
acme:
|
||||
email: you@example.com
|
||||
storage: /etc/traefik/certs/acme.json
|
||||
caServer: https://acme-v02.api.letsencrypt.org/directory
|
||||
httpChallenge:
|
||||
entryPoint: http
|
||||
|
||||
providers:
|
||||
docker:
|
||||
exposedByDefault: false
|
||||
file:
|
||||
directory: /etc/traefik
|
||||
watch: true
|
||||
|
||||
23
traefik/docker-compose.yml
Normal file
23
traefik/docker-compose.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.10
|
||||
container_name: traefik
|
||||
command: --api.insecure=true --providers.docker
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "80:80" # HTTP
|
||||
- "443:443" # HTTPS
|
||||
- "8080:8080" # Web UI (enabled by --api.insecure=true)
|
||||
volumes:
|
||||
- ./config:/etc/traefik # Traefik Configuration
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
networks:
|
||||
- traefik
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
name: traefik_default
|
||||
driver: bridge
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue