{"id":15322868,"url":"https://github.com/msfidelis/sonarqube-stack","last_synced_at":"2025-04-15T02:41:31.287Z","repository":{"id":44329413,"uuid":"353525983","full_name":"msfidelis/sonarqube-stack","owner":"msfidelis","description":":package: :whale: :package: :whale: Local and Kubernetes example to deploy Sonarqube server to CI","archived":false,"fork":false,"pushed_at":"2021-04-02T15:41:52.000Z","size":67,"stargazers_count":15,"open_issues_count":0,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T14:23:00.969Z","etag":null,"topics":["ci","cloud","docker","docker-compose","kubernetes","quality-assurance","sonarqube"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msfidelis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-01T00:25:28.000Z","updated_at":"2024-08-24T13:29:55.000Z","dependencies_parsed_at":"2022-08-30T06:52:03.275Z","dependency_job_id":null,"html_url":"https://github.com/msfidelis/sonarqube-stack","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msfidelis%2Fsonarqube-stack","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msfidelis%2Fsonarqube-stack/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msfidelis%2Fsonarqube-stack/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msfidelis%2Fsonarqube-stack/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msfidelis","download_url":"https://codeload.github.com/msfidelis/sonarqube-stack/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248996794,"owners_count":21195785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci","cloud","docker","docker-compose","kubernetes","quality-assurance","sonarqube"],"created_at":"2024-10-01T09:18:24.933Z","updated_at":"2025-04-15T02:41:31.262Z","avatar_url":"https://github.com/msfidelis.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Running Local\n\n## Setup local stack\n\n```\ndocker-compose up -d postgresql\ndocker-compose up --force-recreate\n```\n\n## Login \n\nAccess http://0.0.0.0:9000 in your browser and wait for sonar setup \n\nThe initial user and password for admin user is `admin/admin`. Change on first access. \n\n## Generate your user token for CI \n\nAccess in your user menu, `My Account` \u003e `Security` \u003e `Generate Tokens`\n\n![account](/.github/img/account.png)\n\n![token](/.github/img/token.png)\n\n## Configure sonar-project.properties on your application \n\n```bash\necho '''\nsonar.projectKey=chip\nsonar.projectName=chip\nsonar.sources=./\nsonar.sourceEncoding=UTF-8\n''' \u003e sonar-project.properties\n```\n\n## Run your first scan\n\n```\ndocker run \\\n    --rm \\\n    -e SONAR_HOST_URL=\"http://0.0.0.0:9000\" \\\n    -e SONAR_LOGIN=2f165ff1a9ed5241471d0a9ce32e8e93ac63ffa5 \\\n    -v \"$(pwd):/usr/src\" \\\n    --network host \\\n    sonarsource/sonar-scanner-cli\n```\n\n# Kubernetes \n\n### Create namespace \n\n```bash \nkubectl apply -f namespaces.yml\n```\n\n### Edit and create configmaps and secrets \n\n```bash \nkubectl apply -f configmap.yml\n```\n\n### Deploy a postgresql stack\n\n```bash \nkubectl apply -f postgresql.yml\n```\n\n### Deploy a sonarqube stack\n\n```bash \nkubectl apply -f sonarqube.yml\n```\n\n## Run your first scan\n\n```\ndocker run \\\n    --rm \\\n    -e SONAR_HOST_URL=\"http://sonarqube.raj.ninja\" \\\n    -e SONAR_LOGIN=2f165ff1a9ed5241471d0a9ce32e8e93ac63ffa5 \\\n    -v \"$(pwd):/usr/src\" \\\n    --network host \\\n    sonarsource/sonar-scanner-cli\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsfidelis%2Fsonarqube-stack","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsfidelis%2Fsonarqube-stack","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsfidelis%2Fsonarqube-stack/lists"}