Tomcat в docker-compose с Traefik возвращает время ожидания шлюза - PullRequest
0 голосов
/ 25 апреля 2019

У меня есть docker-compose с Tomcat и Traefik.Когда я хочу получить доступ к поддомену "https://tomcat.bluehorse.duckdns.org/", он возвращает" Время ожидания шлюза "для доступа к поддомену.

Я могу получить доступ к" https://traefik.bluehorse.duckdns.org/"(WEB ADMIN TRAEFIK) и вижу мою панель управления Traefik свсе внутренние и внешние службы работают, но не "https://tomcat.bluehorse.duckdns.org/".

Панель инструментов:

Dashboard Image

tomcat config

 <Connector port="80" protocol="AJP/1.3" redirectPort="8443" />

docker-compose.yml

version: '3'
services:
  traefik:
    image: traefik:latest
    command: --docker --docker.domain=bluehorse.duckdns.org
    ports:
      - 80:80
      - 443:443
    networks:
      - traefik
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./traefik.toml:/traefik.toml
      - ./acme.json:/acme.json
    labels:
      - "traefik.frontend.rule=Host:traefik.bluehorse.duckdns.org"
      - "traefik.port=8080"
    container_name: traefik
    restart: always
  webserver:
    image: bitnami/tomcat:latest
    labels:
      - "traefik.enable=true"
      - "traefik.frontend.rule=Host:tomcat.bluehorse.duckdns.org"
      - "traefik.port=80"
    volumes:
      - /usr/tomcatfolder:/bitnami
networks:
  traefik:
    external: true

traefik.toml

#Traefik Global Configuration
debug = false
checkNewVersion = true
logLevel = "ERROR"

#Define the EntryPoint for HTTP and HTTPS
defaultEntryPoints = ["https","http"]

#Enable Traefik Dashboard on port 8080
#with basic authentication method
#user and password
[web]
address = ":8080"
[web.auth.basic]
users = ["xxxx:xxxx"] #password creado con htpaswd

#Define the HTTP port 80 and
#HTTPS port 443 EntryPoint
#Enable automatically redirect HTTP to HTTPS
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
[entryPoints.https.tls]

#Enable retry sending a request if the network error
[retry]

#Define Docker Backend Configuration
[docker]
endpoint = "unix:///var/run/docker.sock"
domain = "bluehorse.duckdns.org"
watch = true
exposedbydefault = false

#Letsencrypt Registration
#Define the Letsencrypt ACME HTTP challenge
[acme]
email = "xxxxx@gmail.com"
storage = "acme.json"
entryPoint = "https"
acmeLoggin = true
onDemand = true
OnHostRule = true
  [acme.httpChallenge]
entryPoint = "http" 
...