Exposing service externally with Docker?

I’m working with the docker-compose files on github. Is there a best practice on modifing the sonar.web.host and sonar.web.context variables?

I’m trying to avoid putting something like a nginx proxy in front, but could certainly do that.

The background is that currently the web server isn’t allowing remote access.

Hey there.

This is the only way to serve SonarQube over HTTPS, so it might be something you still consider.

However, I think you’ll find the Environment Variables documentation useful. If they don’t seem to work… try on 8.3 :wink: We had to fix a bug related to them.

Thanks, figured it out.

Part of it was the variable SONAR_WEB_HOST, but there was also the way that I was doing things in the docker-compose.yml file. I had to make adjustments to the ports also since I had an expose also. I added a test proxy also, and found I still had to make the adjustment.

    image: sonarqube:developer
      - 9000
      - ""
      - sonarnet
    restart: always
      - SONARQUBE_JDBC_URL=jdbc:postgresql://db:5432/sonar
      - sonarqube_conf:/opt/sonarqube/conf
      - sonarqube_data:/opt/sonarqube/data
      - sonarqube_extensions:/opt/sonarqube/extensions
      - sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.