Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/flavienbwk/sonarqube-docker-compose

Docker Compose files and example to easily getting you started with SonarQube
https://github.com/flavienbwk/sonarqube-docker-compose

code-quality docker docker-compose sonarqube

Last synced: about 1 month ago
JSON representation

Docker Compose files and example to easily getting you started with SonarQube

Awesome Lists containing this project

README

        

# Sonarqube - Docker compose

Default version included : `10.6.0`

That'll be pretty straightforward :

```bash
sudo sysctl -w vm.max_map_count=512000
# Persist this setting in `/etc/sysctl.conf` and execute `sysctl -p`

cp .env.example .env
docker-compose up -d
```

Default port is 9000 and credentials are `admin`/`admin`

## Running sonar-scanner

We are going to scan some Python code in `./example/python_code`

1. First, go to the SonarQube interface, create a new project and grab :

- The project key (you provide)
- The SonarQube token (provided to you)

2. Configure them in `./example/.env`

3. Let's run our test :

```bash
cd example
docker-compose up
```

## Popular plugins for Community Edition

- Multi-branch : https://github.com/mc1arke/sonarqube-community-branch-plugin
- Active Directory SSO : https://github.com/hkamel/sonar-auth-aad

Don't forget to add this property to `sonar.properties`:

```
sonar.web.javaAdditionalOpts=-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-1.21.0.jar=web
sonar.ce.javaAdditionalOpts=-javaagent:./extensions/plugins/sonarqube-community-branch-plugin-1.21.0.jar=ce
```