This repository contains a Docker Compose setup for deploying SonarQube with a MySQL database. It's designed to help developers quickly set up SonarQube for code quality analysis, particularly for .NET Core projects.
SonarQube is an open-source platform that helps you manage code quality by providing continuous code inspection and analysis for bugs, vulnerabilities, and code smells. This setup leverages Docker Compose to simplify the deployment process.
Before you begin, ensure you have the following installed on your system:
- Docker: Install Docker
- Docker Compose: Install Docker Compose
- Java JDK 11 or 17: Install Java (SonarQube requires Java to run)
Clone this repository to your local machine:
git clone https://github.com/b3r3ch1t/sonarqube.git
cd sonarqube
The repository includes a docker-compose.yml
file that sets up both SonarQube and a MySQL database. The setup includes custom container names and a restart policy to ensure stability.
Run the following command to start the SonarQube and MySQL containers:
docker-compose up -d
This command will download the necessary Docker images (if not already available) and start the containers in the background.
After starting the containers, you can access SonarQube by navigating to:
http://localhost:9000
The default login credentials are:
- Username:
admin
- Password:
admin
You will be prompted to change the password upon your first login.
To integrate SonarQube with your .NET Core projects, follow the steps outlined in this article which provides a detailed guide.
Integrating SonarQube with your CI/CD pipeline is highly recommended to ensure continuous monitoring of code quality. Tools like Jenkins, Azure DevOps, and GitHub Actions can be easily configured to include SonarQube in your build process.
For a detailed guide on setting up and integrating SonarQube with Docker Compose and .NET Core, check out the full article on Medium:
Mastering Code Quality with SonarQube: A Step-by-Step Guide
Let's connect on LinkedIn:
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome! Please submit a pull request or open an issue to suggest improvements or report bugs.
For any questions or support, feel free to contact the repository owner via GitHub.