-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Using service names in docker swarm #3711
Comments
Use container service name and then put .localhost after it. I would suggest against doing it this way for security purposes. You should put it on a separate docker network so that your containers are isolated by networking. Here is the link That explains some best practices: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm struggling to configure npm proxies using service names in docker swarm.
I've put NPM and my other services into the same overlay network. To test if it's working, i entered the container's console and pinged NPM successfully. Then, I created a proxy and used the same hostname I pinged earlier to setup the proxy. When I go to the URL, it gives me a 502 Bad gateway. When I used the IP instead of the hostname, it works.
What can I do to fix this? Is this even possible on docker swarm?
I found similar instructions on the NPM website: https://nginxproxymanager.com/advanced-config/
Somebody else described the process for docker swarm on reddit: https://www.reddit.com/r/selfhosted/s/GlNMq5YuI4
The text was updated successfully, but these errors were encountered: