Timetombs

泛义的工具是文明的基础,而确指的工具却是愚人的器物

66h / 117a
,更新于 2024-12-21T13:29:20Z+08:00 by   2255bb5

[工具] traefik

版权声明 - CC BY-NC-SA 4.0

1 概述

Traefik是一个基于Go语言编写的开源的云原生的边界路由器。

下载: https://github.com/containous/traefik/releases

配置:

# https://docs.traefik.io/v2.2/reference/static-configuration/file/
global:
  checkNewVersion: true
  sendAnonymousUsage: false

log:
  level: DEBUG

# https://docs.traefik.io/v2.2/operations/api
api:
  dashboard: true
  insecure: true
  debug: true

# https://docs.traefik.io/v2.2/routing/entrypoints
entryPoints:
  http:
    address: :80
  mysql:
    address: :3306

providers:
  providersThrottleDuration: 2s
  # https://docs.traefik.io/v2.2/providers/file/
  file:
    watch: true
    filename: dynamic.yml

http:
  routers:
    example.test.router:
      rule: Host(`example.test`)
      service: example.test.service
  services:
    example.test.service:
      loadBalancer:
        servers:
          - url: http://192.168.2.201:5000
        healthCheck:
          scheme: http
          path: /
          interval: 10s
          timeout: 3s

tcp:
  routers:
    mysql.router:
      entryPoints:
        - mysql
      rule: HostSNI(`mysql`)
      service: mysql.service
  services:
    mysql.service:
      loadBalancer:
        servers:
          - address: 192.168.2.201:3306
上一篇 : [工具] openwrt
下一篇 : [工具] android