Initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
|
||||
services:
|
||||
{{ app_name }}:
|
||||
image: {{ traefik_image_name }}
|
||||
container_name: {{ app_name }}
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
command:
|
||||
- --configFile=/etc/traefik/traefik.yml
|
||||
volumes:
|
||||
- {{ docker_socket_path }}:/var/run/docker.sock:ro
|
||||
- ./{{ traefik_config_dir }}/static:/etc/traefik # For traefik.yml
|
||||
- ./{{ traefik_config_dir }}/rules:/rules # For dynamic configurations
|
||||
- ./{{ traefik_config_dir }}/letsencrypt:/letsencrypt
|
||||
- ./{{ traefik_config_dir }}/plugins:/plugins-storage # For Traefik v2 plugins
|
||||
- ./{{ traefik_log_dir }}:/logfiles
|
||||
networks:
|
||||
{{ traefik_proxy_net }}:
|
||||
ipv4_address: {{ traefik_net_ip_addr }}
|
||||
|
||||
|
||||
networks:
|
||||
{{ traefik_proxy_net }}:
|
||||
external: true
|
||||
@@ -0,0 +1,16 @@
|
||||
http:
|
||||
routers:
|
||||
traefik-dashboard:
|
||||
rule: Host(`{{ app_base_domain }}`)&&PathPrefix(`/`)
|
||||
entrypoints:
|
||||
- web
|
||||
- websecure
|
||||
service: dashboard@internal
|
||||
priority: 10
|
||||
traefik-api:
|
||||
rule: Host(`{{ app_base_domain }}`)&&PathPrefix(`/api`)
|
||||
entrypoints:
|
||||
- web
|
||||
- websecure
|
||||
service: api@internal
|
||||
priority: 15
|
||||
@@ -0,0 +1,6 @@
|
||||
http:
|
||||
middlewares:
|
||||
httpsredirect:
|
||||
redirectScheme:
|
||||
scheme: https
|
||||
permanent: true
|
||||
@@ -0,0 +1,49 @@
|
||||
global:
|
||||
sendanonymoususage: false
|
||||
|
||||
api:
|
||||
dashboard: true
|
||||
disabledashboardad: false
|
||||
insecure: false
|
||||
|
||||
log:
|
||||
level: INFO
|
||||
filePath: "/logfiles/traefik.log"
|
||||
format: common
|
||||
|
||||
accesslog:
|
||||
filePath: "/logfiles/access-log.json"
|
||||
format: json
|
||||
fields:
|
||||
headers:
|
||||
defaultMode: keep
|
||||
|
||||
#tracing:
|
||||
# otlp:
|
||||
# http:
|
||||
# endpoint: http://opentelemetry-collector:4318/v1/traces
|
||||
|
||||
entryPoints:
|
||||
web:
|
||||
address: ":80"
|
||||
observability:
|
||||
accessLogs: false
|
||||
websecure:
|
||||
address: ":443"
|
||||
http:
|
||||
tls: true
|
||||
observability:
|
||||
accessLogs: false
|
||||
providers:
|
||||
docker:
|
||||
exposedByDefault: false
|
||||
network: "{{ traefik_proxy_net }}"
|
||||
file:
|
||||
directory: /rules
|
||||
watch: true
|
||||
|
||||
experimental:
|
||||
plugins:
|
||||
rewriteHeaders:
|
||||
modulename: "github.com/vincentinttsh/rewriteheaders"
|
||||
version: "v1.0.0"
|
||||
Reference in New Issue
Block a user