Created
June 5, 2024 04:42
-
-
Save matteopic/4c88b0013c6bc90cdadf5a4732c0f444 to your computer and use it in GitHub Desktop.
Scan local project with sonarqube and docker compose
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
services: | |
scanner: | |
image: sonarsource/sonar-scanner-cli | |
environment: | |
SONAR_HOST_URL: http://sonarqube:9000 | |
SONAR_SCANNER_OPTS: -Dsonar.projectKey=<MY-PROJECT-NAME> | |
SONAR_TOKEN: <MY-USER-TOKEN> | |
volumes: | |
- .:/usr/src | |
depends_on: | |
- sonarqube | |
sonarqube: | |
image: sonarqube | |
ports: | |
- 9000:9000 | |
volumes: | |
- sonarqube_data:/opt/sonarqube/data | |
- sonarqube_logs:/opt/sonarqube/logs | |
- sonarqube_extensions:/opt/sonarqube/extensions | |
volumes: | |
sonarqube_data: | |
sonarqube_logs: | |
sonarqube_extensions: |
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
sonar.projectKey=<MY-PROJECT-NAME> | |
sonar.projectName=This is My Project description | |
sonar.sources=. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment