Problems with docker-compose.yml for traefik-v2 (jvb entrypoints / jicofo port)

See original GitHub issue

I’m trying to launch this service using the examples/traefik-v2/docker-compose.yml file. I made the following changes before running:

  • replace network web with traefik’s docker network (traefik_default)
  • update traefik.http.routers.app.rule label on “web” service to match my own hostname

After completing these steps, I ran these commands and saw these error messages:

$ docker-compose -f examples/traefik-v2/docker-compose.yml up -d
$ docker logs traefik_reverse-proxy_1
level=error msg="service \"jicofo-traefik-v2\" error: port is missing" providerName=docker container=jicofo-traefik-v2-978e931e948edf531c5fdc3fecb99444022a290bd2267c41fb130117de951733
level=error msg="entryPoint \"video\" doesn't exist" routerName=jvb@docker entryPointName=video
level=error msg="no valid entryPoint for this router" routerName=jvb@docker 

It appears that there are two problems:

  1. The sample docker-compose.yml references a “video” traefik entrypoint that I don’t have defined—but I don’t see any definition of this entrypoint in the docs.
  2. Traefik needs to know which port to talk to the “jicofo” service on. (Alternately, if jicofo doesn’t need to receive any transactions on any ports, maybe it would help to add a traefik.enable: false label to that service?)

@ruby232, I notice you committed this file at the end of March. Any insight on these questions?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rluecommented, Jul 26, 2020

Sorry, I figured this out—you need the following block in your traefik.toml:

[entryPoints]
  [entryPoints.video]
    address = ":10000/udp"

Will submit a PR later.

0reactions
prayagsinghcommented, Aug 18, 2020

FYI: A working example based on traefik:v2.2.8. Using tls-challenge for letsencrypt cert.

version: '3.8'

services:
  traefik:
    image: "traefik:v2.2.8"
    hostname: "traefik"
    labels:
      - "traefik.enable=false"  # set it to `true` if you want traefik dashboard. If set to `false` then traefik won't consider below config
      - "traefik.docker.network=proxy"
      - "traefik.http.routers.api.rule=Host(`traefik.example.com`)  && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
      - "traefik.http.routers.api.service=api@internal"
      - "traefik.http.routers.api.middlewares=auth"
      ## Middlewares
      - "traefik.http.middlewares.auth.basicauth.users=alpha:$$1$$SEjVHN0z$$Apa3.iHJAW2dbAi6OuwDe/"
      ### host header
      #- "traefik.http.middlewares.hosthdr.headers.stsseconds=31536000"
      #- "traefik.http.middlewares.hosthdr.headers.stsincludesubdomains=true"
      #- "traefik.http.middlewares.hosthdr.headers.stspreload=true"
      # enable https for api/dashboard
      - "traefik.http.routers.api.tls.certresolver=letsencrypt"
      - "traefik.http.routers.api.entrypoints=websecure"
      - "traefik.http.routers.api.tls.domains[0].main=traefik.example.com"
      # dummy port
      - "traefik.http.services.dummyservice.loadbalancer.server.port=1111" # In swarm mode, traefik requires a dummy Port

    command:
      - --api=true
      - --api.dashboard=true
      - --providers.docker=true
      - --providers.docker.endpoint=unix:///var/run/docker.sock
      - --providers.docker.swarmMode=false
      - --providers.docker.exposedbydefault=false
      - --log.level=INFO #DEBUG
      - --accesslog=false
      - --entryPoints.web.address=:80
      - --entrypoints.web.http.redirections.entrypoint.to=websecure
      - --entrypoints.web.http.redirections.entrypoint.scheme=https
      - --entrypoints.web.http.redirections.entrypoint.permanent=true
      - --entryPoints.websecure.address=:443
      # comment below line in production
      - --certificatesResolvers.letsencrypt.acme.caServer=https://acme-staging-v02.api.letsencrypt.org/directory
      - --certificatesResolvers.letsencrypt.acme.tlsChallenge=true
      - --certificatesresolvers.letsencrypt.acme.email=myemail@gmail.com
      - --certificatesResolvers.letsencrypt.acme.storage=/letsencrypt/acme.json
    ports:
      - target: 80
        published: 80
        mode: host

      - target: 443
        published: 443
        mode: host

    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
      - "./letsencrypt:/letsencrypt"
    networks:
      - proxy

networks:
  proxy:
    external: true
    name: proxy
  1. Add below config under web service in docker-compose.yml file.
       labels:
          - "traefik.enable=true"
          - "traefik.docker.network=proxy"
          - "traefik.http.routers.jitsi-secure.entrypoints=websecure"
          - "traefik.http.routers.jitsi-secure.rule=Host(`meet.example.com`)"
          ## LetsEncrypt
          - "traefik.http.routers.jitsi-secure.tls=true"
          - "traefik.http.routers.jitsi-secure.tls.certresolver=letsencrypt"
          - "traefik.http.routers.jitsi-secure.tls.domains[0].main=meet.example.com"
          ## Service
          - "traefik.http.routers.jitsi-secure.service=jitsi" #here service name is jitsi
          - "traefik.http.services.jitsi.loadbalancer.server.port=80"

       networks:
            proxy:  # traefik network created externally
            jitsi:     # jitsi network
              aliases:
                - meet.example.com # change this accordingly
Read more comments on GitHub >

github_iconTop Results From Across the Web

Traefik and docker install - Install & Config - developers & users
I have been trying to install Jitsi using Traefik to handle the certificate and routing, but it is returning a bad-gateway message for...
Read more >
Add TLS to Traefik 2 router end with unavailable service
I can access whoami service without https configuration but when I add tls to the router labels, it doesn't work anymore. Here is...
Read more >
Docker-compose basic example - Traefik Labs documentation
This guide covers a basic docker-compose file exposing a simple service using the docker provider in Traefik Proxy. Read the technical documentation.
Read more >
Work-Adventure/install - Technologia Incognita
By default, the docker-compose file provisions the following containers: reverse-proxy: a 'traefik:v2.0' container from the public docker repo's ...
Read more >
Deploying Portainer behind Traefik Proxy
In the following docker-compose.yml you will find the configuration for Portainer Traefik with SSL ... "traefik.http.routers.http-catchall.entrypoints=web".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found