Last active
February 19, 2018 09:09
-
-
Save andanhm/20e4948b78ab1e59eee0949d13dd7971 to your computer and use it in GitHub Desktop.
Sonar MySQL Docker composer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
db: | |
container_name: mysql_sonarqube | |
image: mysql:latest | |
ports: | |
- "3308:3306" | |
environment: | |
- MYSQL_ROOT_PASSWORD=sonar | |
- MYSQL_DATABASE=sonar | |
- MYSQL_USER=sonar | |
- MYSQL_PASSWORD=sonar | |
sonarqube: | |
image: sonarqube:latest | |
container_name: sonarqube | |
ports: | |
- "9000:9000" | |
environment: | |
- SONARQUBE_JDBC_USERNAME=sonar | |
- SONARQUBE_JDBC_PASSWORD=sonar | |
- SONARQUBE_JDBC_URL=jdbc:mysql://localhost:3308/sonar?useSSL=false&useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true | |
depends_on: | |
- db | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issues may encounter and solution to resolve
MySql connection issue update localhost to your IP address
bash $ ifconfig | grep "inet " | grep -v 127.0.0.1
Example: python sonar with code coverage
Code coverage
Install following pip packages
$ pip install nose $ pip install coverage $ cd /usr/bin $ sudo easy_install nose
Running