vanderby / SonarQube-AzureAppService

Instructions and files to host SonarQube on an Azure App Service without a container.
MIT License
90 stars 165 forks source link

Instead of using the application settings to set DB connection use Connection strings? #36

Closed BChip closed 4 years ago

BChip commented 4 years ago

Looking into App Service > Configuration - You can set the application settings and put your sonar.jdbc.password, sonar.jdbc.url, and etc.

Would it be possible to use the connection strings feature in app service configuration instead?

vanderby commented 4 years ago

What would be the benefit for doing this other than the logical grouping of connection string settings in the connection string section?

Both app settings and connection string get set as environment variables with the difference that connection strings are prefixed with the type of connection string. https://docs.microsoft.com/en-us/azure/app-service/configure-common#configure-connection-strings

The startup script simply looks for environment variables that start with 'sonar.' and inserts them into the matching line in the sonar.properties file. If we add the logic to account for connection strings and their different prefixes that would make the logic more complex and harder to maintain.

BChip commented 4 years ago

Yes, other than logical grouping, the benefits are 1:1.

Overall, this is not a issue or any kind of deal breaker. Thanks for the fast response! I am going to close this.

Thanks again!