SonarQube on Azure App Service (container) and Home/Data/Temp Dirs (/opt)

Hello!

I am trying to run the “sonarqube:community” latest image in an Azure App Service (container). Eventually I will need to run the Enterprise image, but for testing the Community image will do.

The problem I run into is that SonarQube expects index data to be persisted in /opt/sonarqube/data, while the persistent storage within App Service is mounted to /home. This causes project data to be reloaded (Elastic Search re-index) on every restart or scale up operation.
I’ve come across several posts where an additional layer is added to the sonarqube images to fix this with symlinks.

While this workaround is possible to implement, it means keeping track of the upstream entry point and updating locally as required.
I was hoping there would be a more elegant solution to change the Home/Data/Temp Dirs?

Thanks in advance.

Hey there.

To be upfront, we don’t have much (if any) experience deploying to Azure App Service, except being aware that some users take advantage of GitHub - vanderby/SonarQube-AzureAppService: Instructions and files to host SonarQube on an Azure App Service without a container..

I’m wondering if the SONAR_PATH_DATA and SONAR_PATH_TEMP Enviornment Variables help in this case.

Hi Collin,

Sorry for the late reply.
Indeed those environment variables allow me to work with the SonarQube images directly!
Thanks.

Alexander

1 Like

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