From fbae49b898e4df253fe8f5087879d4e8ab697b9a Mon Sep 17 00:00:00 2001 From: xiagw Date: Wed, 29 May 2019 08:57:01 +0800 Subject: [PATCH] add docs for sonarqube (#2149) --- DOCUMENTATION/content/documentation/index.md | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index 0704aba4..aa0fd034 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -394,6 +394,37 @@ Always download the latest version of [Loaders for ionCube ](http://www.ioncube. +
+ + +## Install SonarQube (automatic code review tool) +SonarQube® is an automatic code review tool to detect bugs, vulnerabilities and code smells in your code. It can integrate with your existing workflow to enable continuous code inspection across your project branches and pull requests. +
+1 - Open the `.env` file +
+2 - Search for the `SONARQUBE_HOSTNAME=sonar.example.com` argument +
+3 - Set it to your-domain `sonar.example.com` +
+4 - `docker-compose up -d sonarqube` +
+5 - Open your browser: http://localhost:9000/ + +Troubleshooting: + +if you encounter a database error: +``` +docker-compose exec --user=root postgres +source docker-entrypoint-initdb.d/init_sonarqube_db.sh +``` + +If you encounter logs error: +``` +docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs +``` +[**SonarQube Documentation Here**](https://docs.sonarqube.org/latest/) + +