dockerswarm.rocks: Traefik couldn't deploy new stacks , 404 error
Hello , I could setup everything(Traefik,Consul,Swarmprom,Swarmpit,Portainer) perfect with this guide . But the problem occurs when I deploy new stacks . For eg., wordpress . I get404 page not found. All the containers and services are running for the stack but traefik UI doesn’t show any frontends/backends.
version: "3"
networks:
traefik-public:
external: true
internal:
external: false
services:
wordpress:
image: wordpress:4.9.8-apache
environment:
WORDPRESS_DB_PASSWORD:
labels:
- traefik.backend=wordpress
- traefik.enable=true
- traefik.frontend.rule=Host:wordpress.${DOMAIN}
- traefik.docker.network=traefik-public
- traefik.tags=${TRAEFIK_PUBLIC_TAG:-traefik-public}
- traefik.port=80
# Traefik service that listens to HTTP
- traefik.redirectorservice.frontend.entryPoints=http
- traefik.redirectorservice.frontend.redirect.entryPoint=https
# Traefik service that listens to HTTPS
- traefik.webservice.frontend.entryPoints=https
networks:
- internal
- traefik-public
depends_on:
- mysql
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD:
networks:
- internal
labels:
- traefik.enable=false
adminer:
image: adminer:4.6.3-standalone
labels:
- traefik.backend=adminer
- traefik.frontend.rule=Host:db-admin.wp.${DOMAIN}
- traefik.docker.network=traefik-public
- traefik.port=8080
networks:
- internal
- traefik-public
depends_on:
- mysql
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 23 (7 by maintainers)
Ok, I found a solution in my case.
In my previous installation Traefik was talking HTTPS with the proxied service (Zulip server). It seems that under swarm.rocks installation this does not work.
Using
DISABLE_HTTPSin the Zulip server, and making Traefik talk totraefik.port: 80solved my problem. All is working fine now.Still a bit weird why under the current installation that would cause a problem, whereas this used to work, but since I got this working now, I’ll leave it at that. It’s not less secure anyways, since the traffik between traefik and zulip server is internal communications only (I think/hope)
I’ll let myself out now. Sorry for “polluting” this issue.
Ah alright good to know, this makes so many things much easier.
@noobcoder1983 yes, that is correct, at least in my experience…it looks like every container is assigned a unique “internal IP” as well, which prevents such port conflicts.
Yes, that’s correct @noobcoder1983 .