add sonarqube to docker-compose (#2113)

* add sonarqube to docker-compose
* change volume dir
* add postgres init db
* add comment for sonarqube error
This commit is contained in:
xiagw
2019-05-08 18:10:22 +08:00
committed by Shao Yu-Lung (Allen)
parent f5c80cd251
commit cbbdb0a86b
6 changed files with 94 additions and 1 deletions

View File

@ -676,3 +676,19 @@ MANTICORE_HTTP_PORT=9308
PGADMIN_PORT=5050
PGADMIN_DEFAULT_EMAIL=pgadmin4@pgadmin.org
PGADMIN_DEFAULT_PASSWORD=admin
### SONARQUBE ################################################
## docker-compose up -d sonarqube
## (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_HOSTNAME=sonar.example.com
SONARQUBE_PORT=9000
SONARQUBE_POSTGRES_INIT=true
SONARQUBE_POSTGRES_HOST=postgres
SONARQUBE_POSTGRES_DB=sonar
SONARQUBE_POSTGRES_USER=sonar
SONARQUBE_POSTGRES_PASSWORD=sonarPass