-
-
Notifications
You must be signed in to change notification settings - Fork 909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Domain not working after server restart or Traefik reload #1345
Comments
Thanks for the detail, I can already guess what is happening, we currently run this command, we look for the current container that is called dokploy-traefik and join it to the network, but when it is restarted as regular docker containers do not keep the same reference to docker swarm service level, so when it is restarted I assume that reference is lost that we did in the command, I guess I would have to change the command to update the service and not use the regular containers, I had not really contemplated this case! thank you very much. dokploy/packages/server/src/utils/builders/compose.ts Lines 82 to 86 in 56af894
|
It seems that using docker service update will not be the best solution and we are likely to have a breaking change or downtime, because adding a docker network to a docker swarm service will cause downtime because it will force a restart of the traefik container which is not a good idea because every time we deploy a template we will have this problem, another solution, which to some extent is a breaking change, is to basically replace a docker swarm service of dokloy-traefik with a regular docker container, and that would work in any case whether it's a reboot or whatever. |
When this will going to fix or any alternative way to fix this? Can I pull this branch? (https://github.com/Dokploy/dokploy/tree/1345-domain-not-working-after-server-restart-or-traefik-reload) |
To Reproduce
I have tested with the Ghost and Umami templates, when deployed for the first time everything works fine
When the server is restarted or when Traefik is reloaded the domain stops working.
Current vs. Expected behavior
Domain does not redirect to container
When the server is restarted or Traefik is reloaded, the domains should work automatically without having to deploy each application
Provide environment information
Which area(s) are affected? (Select all that apply)
Traefik
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
I have an older version of the Umami template that does not have this problem. I was able to identify that this version had the following piece of code
Which was removed in #1276. I could see that in this version the umami service did not create a network for compose, but rather only the
dokploy-network
was used. When restarting the server or reloading Traefik the domain worked perfectly.In the latest version I can see that a network is created (in my case
utilidades-umami-58e1ef
) in which after deploying 3 containers are tied: traefik, umami and db. This is when everything works fine.But when restarting the server or reloading traefik only umami and db are tied.
After deploying, the 3 containers are tied together again and it works again.
How can I solve this problem? Taking into account that I have several Compose in my Dokploy, and I would not like to have to deploy one by one every time there is an OS update and I have to restart the server
Thank you very much for your help. I love Dokploy 😄
Will you send a PR to fix it?
Maybe, need help
The text was updated successfully, but these errors were encountered: