-
-
Notifications
You must be signed in to change notification settings - Fork 553
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
network conflict #1004
Comments
Hi, yes you are right, this is a bug that I am seeing for some time you can not deploy 2 equal templates because it is possible to mix the information and cause bad gateway errors or something like that and it is because in the dokploy-network the service names must be unique, currently I have not found a way to solve it that is elegant, I know it is something related to networks but I have no idea to solve it, I have tried different methods but none with the success I want without having to do a lot of magic behind compose. If you have any idea how to solve it in an elegant and direct way that is not something so manual would be great I believe is related to this #821 |
maybe, You can add a random variable which can into docker-compose? |
how about insert service-name into configuration. |
I think this can solve the problem of official templates at least. |
Yes, I was thinking about some of that, I just didn't like it because it was something that had to be done manually and I don't know how comfortable people would feel doing that. I assumed that adding --project-name would add the prefix to all containers, and it does but in the internal way of communication it directly uses the name of the service, so if you have a service like db in multiple compose, there might be problems. https://docs.docker.com/reference/cli/docker/compose/#options yes a temporary solution is to add a prefix to every container |
To Reproduce
using two same docker-compose to create services.
Current vs. Expected behavior
if deploy 2 compose has same configuration, the second deploy will using the first. for example, if there are all have pg, the second service will connect to the pg from the first service.
Provide environment information
Which area(s) are affected? (Select all that apply)
Docker Compose
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
No response
Will you send a PR to fix it?
Yes
The text was updated successfully, but these errors were encountered: