Skip to content

Instantly share code, notes, and snippets.

@anandtripathi5
Created June 15, 2021 16:15
Show Gist options
  • Save anandtripathi5/cb1471e54c12f48ab5d07b8a91af18c2 to your computer and use it in GitHub Desktop.
Save anandtripathi5/cb1471e54c12f48ab5d07b8a91af18c2 to your computer and use it in GitHub Desktop.
Sonarqube docker compose file to spint Sonarqube container and a postgres container for the data of Sonarqube
version: "3"
services:
sonarqube:
image: sonarqube:8.5.1-community
container_name: sonarqube
hostname: sonarqube
ports:
- 9000:9000
environment:
- sonar.jdbc.username=admin
- sonar.jdbc.password=admin
- sonar.search.javaAdditionalOpts=-Dbootstrap.system_call_filter=false
volumes:
- ./logs:/opt/sonarqube/logs
- ./data:/opt/sonarqube/data
- ./extensions:/opt/sonarqube/extensions
db:
image: postgres:13.1
container_name: db
hostname: db
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
volumes:
- ./pg_db:/var/lib/postgresql
- ./pg_data:/var/lib/postgresql/data
ulimits:
nofile:
soft: 65536
hard: 65536
volumes:
pg_db:
driver: local
pg_data:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment