-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Can't connect to cloud config server, from inside docker compose #2421
Comments
Can you provide a complete, minimal, verifiable sample that reproduces the problem? It should be available as a GitHub (or similar) project or attached to this issue as a zip file. |
The problem was that they were not on the same network. Then after this, I had another problem of the app starting before the cloud config server and requesting the data from it, from an endpoint, but as it was not fully started, it failed. I fixed it by adding: deploy:
restart_policy:
condition: on-failure Now it fails repeatedly until the server starts and then it is able to connect. I have tried using healthcheck and conditionals, but the cloud server config image does not allow execution from terminal, I tried with wait-for-it.sh, with which I had some other problems. So, in the end I solved it with this. If you have a better solution, please let me know. my-app:
image: my-app-image
deploy:
mode: replicated
restart_policy:
condition: on-failure
depends_on:
- config
networks:
- vd-network
ports:
- "9000:9000" |
Thanks for the update! |
No, problem. The less people have to do this, the better. |
Describe the bug
So, I try to connect my spring app to the cloud config server, but it doesn't work when I try to access it after I deploy my app from inside the docker.
bootstrap-docker.yaml
This doesnt work, and If I change it to localhost, it works only when deploying the app directly, but not when running through docker.
What is the reason for the inability to connect. when running through docker?
The text was updated successfully, but these errors were encountered: