Traefik

Define host and path frontend rule for Traefik

余生颓废 提交于 2020-07-18 04:02:04
问题 I am trying to use Traefik to deploy proxy multiple applications in my Docker Swarm mode cluster. I have got it so that it proxies a named Host but I want it to proxy on a named Host and Path, but I cannot work out the labels I need to use. This is the docker service command I am using: docker service create \ \ --label "traefik.port=9000" \ --label "traefik.docker.network=traefik-net" \ --label "traefik.frontend.rule=Host:`hostname -f`" \ --label="traefik.backend=portainer" \ \ --constraint

How to renew Letsecncrypt certificates with the same public key

谁说胖子不能爱 提交于 2020-06-29 05:21:39
问题 To use Traefik 1.7 on APIs for serving mobile apps that require the use of certificate pinning on the public key, it's necessary to configure the acme section on the toml file to reuse the same private/public key pair when renewing the certificates, but I don't find anywhere in the docs how I can do it. So I am looking for the same behavior that I believe the --reuse-key in certbot gives: --reuse-key When renewing, use the same private key as the existing certificate. (default: False) NOTE: I

How should I setup Traefik on ECS?

寵の児 提交于 2020-06-25 10:28:10
问题 In Short I've managed to run Traefik locally and on AWS ECS but now I'm wondering how should I setup some sort of load balancing to make my two services with random IPs available to the public. My current setup on ECS [Internet] | [Load balancer on port 443 + ALB Security group on 443] | [Target group on port 443 + Security group from *any* port] | [cluster] | [service1 container ports "0:5000"] While this works, I'd now like to add another container, eg. service2 also with random ports eg 0

Traefik > “Bad gateway” (error 502) for some containers

为君一笑 提交于 2020-06-10 02:50:12
问题 I meet some problems using traefik with docker and I don't know why. With some containers, it's works like a charm and for other ones, I have an error when I try to access to these ones : Bad gateway (error 502). Here is my traefik.toml : # Service logs (here debug mode) debug = true logLevel = "DEBUG" defaultEntryPoints = ["http", "https"] # Access log filePath = "/var/log/traefik/access.log" format = "common" ################################################################ # Web

How to enable logrotation for traefik?

别等时光非礼了梦想. 提交于 2020-05-26 06:36:38
问题 How do I enable log rotation for log files e.g. access.log. Is this built in ? Docs only say "This allows the logs to be rotated and processed by an external program, such as logrotate" 回答1: Log Rotation Traefik will close and reopen its log files, assuming they're configured, on receipt of a USR1 signal. This allows the logs to be rotated and processed by an external program, such as logrotate . https://docs.traefik.io/v1.6/configuration/logs/#log-rotation 回答2: If you are running Traefik in

Can't resolve URL in Traefik Getting Error 404

老子叫甜甜 提交于 2020-05-17 10:21:30
问题 The problem I am facing is somewhat known to me but still, I wanted to understand the problem in my implementation. I have a Traefik container and a service container. The service container has certain routes that serves the pages. In order to pass the request from Traefik to the service/application container,I have attached a label to my container. The label has a path as the one in my application so that Traefik can redirect the request to backend service and finally my service can serve

Accessing container on port 3000 thru traefik

核能气质少年 提交于 2020-05-15 21:23:22
问题 Okay, so I've got a node-js app I'd like to access thru traefik. The node-js app runs on port 3000 I've got traefik running after following the test-it instructions from the getting started page. docker-compose.yml version: '2' services: app: build: context: . dockerfile: docker/app/Dockerfile environment: - NODE_ENV=development - NODE_PORT=3000 volumes: - ./app:/app expose: - "3000" networks: - web labels: - "traefik.backend=microservice" - "traefik.backend.port=3000" - "traefik.port=3000" -

Accessing container on port 3000 thru traefik

試著忘記壹切 提交于 2020-05-15 21:21:28
问题 Okay, so I've got a node-js app I'd like to access thru traefik. The node-js app runs on port 3000 I've got traefik running after following the test-it instructions from the getting started page. docker-compose.yml version: '2' services: app: build: context: . dockerfile: docker/app/Dockerfile environment: - NODE_ENV=development - NODE_PORT=3000 volumes: - ./app:/app expose: - "3000" networks: - web labels: - "traefik.backend=microservice" - "traefik.backend.port=3000" - "traefik.port=3000" -

Can X-Real-IP be set when using Proxy Protocol?

梦想的初衷 提交于 2020-05-15 07:57:09
问题 My setup is as follows: Load Balancer → nginx → Traefik The load balancer in place does not support Proxy Protocol. Instead it adds the real IP of the client to the TCP options field (yikes, I know! Details). That's something Traefik does not support. To get the real IP to Traefik, I added an nginx inbetween that does nothing more than accepting connections on ports 80 and 443 and adding Proxy Protocol when using SSL. Traefik is configured for Proxy Protocol. Things work as expected. However

Autopilot Pattern Applications 开发模式

假装没事ソ 提交于 2020-05-02 11:42:45
转自: http://autopilotpattern.io/ ,一种不错的应用开发模式 The autopilot pattern automates in code the repetitive and boring operational tasks of an application, including startup, shutdown, scaling, and recovery from anticipated failure conditions for reliability, ease of use, and improved productivity. Why do we need to do this? Who is this for? How do we do it? How does this differ from previous approaches to automation? How does this differ from scheduler-backed container automation? What infrastructure do we need to do this? Example apps using this pattern Why do we need to do this? We need to make the