skip to Main Content

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?

2

Answers


  1. Chosen as BEST ANSWER

    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:


  2. 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
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search