networks: #Define the shared network
tikia-app-network:
driver: bridge
When I reboot the host machine daily, I do a “docker network inspect tikia-app-network the endpoint id’s are different. I know containers should be using service name discovery but they still cannot see each other. I have to create a new network after each reboot. I don’t want to do that why wont it just work
Containers are for isolation. By default, Docker compose creates Docker networks per compose project. They are by default prefixed with the current project name, see docker network ls.
Usually you would create a network in one project with attachable: true and name:, and in other projects use external: true, to make it available to all projects, like proxy and services.
Or you manually create a Docker network and use in all compose files external: true.
I don’t understand the issue. What is happening exactly? You say it doesn’t work after reboot, but what is not working? What is the error message?
@bluepuma77 shared his thoughts about what might help you. Please, reply to that post too and share if you think it is not relevant i your case and why you think that. Every time I read that post again, I feel more that it is what your problem could be.
And please, sue code blocks so we can undrstand your shared code snippets.