Closed NickUfer closed 5 months ago
The error message you're seeing is due to a conflict between the network_mode: service:db
option and the port publishing options in your Docker Compose file.
When you set network_mode: service:<name>
, it means your service app is using the network stack of the service db
. In this mode, it doesn't have its own network space, so you can't publish ports directly from this service. That's why you're seeing a conflict.
If you want your app service to communicate with the db service and also publish ports, you should use the default bridge network mode (which is used when network_mode is not specified). In this mode, all services can communicate with each other and you can publish ports from any service.
Feel free to reopen the issue if this comment doesn't resolve your problem or if you have any follow-up questions. Thanks!
When I use the template from this commit, I get this error:
I omit posting my config as it is the exact same as in this commit. I try to run this locally via JetBrains's RustRover.
When I remove
network_mode: service:db
from the app service in the docker compose file it at least starts.