Traefik - 502 错误网关

问题描述

你好

我正在尝试将 Docker 容器连接到 Traefik。它不起作用。

我无法通过主机访问我的容器。

我尝试了几件事:检查端口,检查容器是否在同一网络上,停止并重新启动网络,检查是否有错误等。无法查看它来自哪里。 :(

我还有另外两个已经与 Traefik 一起使用的容器。但是这个容器不想...

我的额头上有一个角大小的肿块,我已经用头撞了两天了。

我的 traefik docker 日志:

msg="'502 Bad Gateway' caused by: dial tcp 172.23.0.6:5345: connect: connection refused"

我的 Docker 撰写文件

services:
  db:
    image: mariadb:10.3
    env_file:
      - env/MysqL.env
    volumes:
      - database_volume:/var/lib/MysqL
        #ports:
        #- "127.0.0.1:3306:3306"
    networks:
      - traefik-public

  passbolt:
    image: passbolt/passbolt:latest-ce
    #Alternatively you can use rootless:
    #image: passbolt/passbolt:latest-ce-non-root
    tty: true
    labels:
      - traefik.enable=true
      - traefik.docker.network=traefik-public
      - traefik.constraint-label=traefik-public
      - traefik.http.routers.vault-https.rule=Host(`vault.audiowizard.fr`)
      - traefik.http.routers.vault-https.entrypoints=websecure      
      - traefik.http.routers.vault-https.tls=true      
      - traefik.http.routers.vault-https.tls.certresolver=lets-encrypt      
      - traefik.http.services.vault-https.loadbalancer.server.port=5345          
    depends_on:      
      - db 
    env_file:
      - env/passbolt.env
    volumes:
      - gpg_volume:/etc/passbolt/gpg
      - images_volume:/usr/share/PHP/passbolt/webroot/img/public
    command: ["/usr/bin/wait-for.sh","-t","0","db:3306","--","/docker-entrypoint.sh"]
    networks:
      - traefik-public
   #ports:
     #- 5080:80
     #- 5443:443
    #Alternatively for non-root images:
    # - 80:8080
    # - 443:4433

volumes:
  database_volume:
  gpg_volume:
  images_volume:

networks:
  traefik-public:
    external: true

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)