SonarQube
是一个开源的代码质量管理系统。
文件
version: "3"
services:
sonarqube:
image: sonarqube:8.5.1-community
container_name: sonarqube
restart: 'no'
networks:
- sonarnet
environment:
- sonar.jdbc.username=sonar
- sonar.jdbc.password=sonar
- sonar.jdbc.url=jdbc:postgresql://sonarqube-postgre:5432/sonarqube
- sonar.search.javaOpts=-Xms256m -Xmx1024m
ports:
- "9000:9000"
- "9092:9092"
depends_on:
- sonarqube-postgre
links:
- sonarqube-postgre
volumes:
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
sonarqube-postgre:
image: postgres:12.4-alpine
container_name: sonarqube-postgre
restart: 'no'
networks:
- sonarnet
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
- POSTGRES_DB=sonarqube
volumes:
- sonarqube_postgre_db:/var/lib/postgresql
- sonarqube_postgre_data:/var/lib/postgresql/data
volumes:
sonarqube_bundled-plugins: null
sonarqube_data: null
sonarqube_extensions: null
sonarqube_postgre_db: null
sonarqube_postgre_data:
null
networks:
sonarnet:
driver: bridge
docker-compose -f docker-compose.yaml up