Please visit https://github.com/ayudadigital/gp-sonarqube
Docker image and docker-compose sample configuration to bring up a Sonar Service to the Teecke Docker Generic Platform (GP).
The service is formed by two containers:
- sonarqube: based on SonarQube docker image.
- sonardb: based on PostgreSQL databasse docker image.
-
Configure the following elements on the docker host as it figures on the SonarQube Docker hub documentation.
sysctl -w vm.max_map_count=262144 sysctl -w fs.file-max=65536
-
Create the
.env
file based on the.env.dist
template and configure the Postgres password:$ cp .env.dist .env $ cat .env POSTGRES_USER=sonar POSTGRES_PASSWORD=[PUT_YOUR_POSTGRES_PASSWORD_HERE] $ vim .env [...] $ cat .env POSTGRES_USER=sonar POSTGRES_PASSWORD=sonar
-
Use the
docker-compose.yml.sample
file as your docker-compose configuration file. -
Install assets
-
Start with
docker-compose up -d
. -
Open the url http://localhost:9000 in a browser to access to the SonarQube gui and complete the configuration.
-
Manage backups of your files:
- Make a backup executing
docker-compose exec -u root sonarqube backup
. - Find the current backup within the
/var/backups/gp/sonarqube/
of the container. - Extract the current backup executing
docker cp $(docker-compose ps -q sonarqube):/var/backups/gp gp
.
- Make a backup executing
-
Stop the platform with
docker-compose stop
.
There are two volumes created with the database. All data and configuration are on those volumes, so never delete it.
$ docker volume ls|grep sonarqube
local gp-sonarqube_postgresql
local gp-sonarqube_postgresql_data
You can use this docker piece with the Docker Generic Platform project.
None known