-4

I have a Docker container for my web server running on 127.0.0.1:8009 and I also installed the Self Hosted Sentry app running on 127.0.0.1:9000. But now the web server cannot connect to the sentry service and send error messages. I also test with the docker container name and it doesn't work.

Can someone help me manage it?

Mutatos
  • 1,675
  • 4
  • 25
  • 55

2 Answers2

0

You need to have Sentry and your web server in the same docker network for them to be able to communicate.

If you use docker-compose add something like this to you sentry compose file:

networks:
  default:
    name: "sentry"

And something like this to your web server compose file:

networks:
  default:
    external:
      name: sentry
0

The solution is to add an extra host:

    extra_hosts:
        - "host.docker.internal:host-gateway"

After that you can call everything running on localhost: with host.docker.internal:

Mutatos
  • 1,675
  • 4
  • 25
  • 55