2023-10-27 12:22:35 +00:00
|
|
|
# ignore: true
|
2023-10-26 23:41:07 +00:00
|
|
|
# documentation: https://hub.docker.com/_/sonarqube/
|
|
|
|
# slogan: SonarQube is a self-managed, automatic code review tool that systematically helps you deliver Clean Code
|
|
|
|
# tags: sonarqube, code-review, clean-code, quality, code-quality, code-analysis, code-smells, code-coverage, code-security
|
|
|
|
|
|
|
|
services:
|
|
|
|
sonarqube:
|
|
|
|
image: sonarqube:community
|
|
|
|
environment:
|
2023-10-27 12:22:35 +00:00
|
|
|
- SERVICE_FQDN_SONARQUBE_9000
|
2023-10-26 23:41:07 +00:00
|
|
|
- SONAR_JDBC_URL=jdbc:postgresql://postgresql:5432/${POSTGRES_DB:-sonar}
|
|
|
|
- SONAR_JDBC_USERNAME=$SERVICE_USER_POSTGRES
|
|
|
|
- SONAR_JDBC_PASSWORD=$SERVICE_PASSWORD_POSTGRES
|
|
|
|
volumes:
|
2023-10-27 12:22:35 +00:00
|
|
|
- sonarqube-data:/opt/sonarqube
|
|
|
|
- sonarqube-conf:/opt/sonarqube/conf
|
|
|
|
- sonarqube-extensions:/opt/sonarqube/extensions
|
|
|
|
- sonarqube-logs:/opt/sonarqube/logs
|
|
|
|
- sonarqube-bundled-plugins:/opt/sonarqube/lib/bundled-plugins
|
2023-10-26 23:41:07 +00:00
|
|
|
depends_on:
|
|
|
|
postgresql:
|
|
|
|
condition: service_healthy
|
|
|
|
postgresql:
|
|
|
|
image: postgres:15-alpine
|
|
|
|
volumes:
|
|
|
|
- postgresql-data:/var/lib/postgresql/data
|
|
|
|
environment:
|
|
|
|
- POSTGRES_USER=$SERVICE_USER_POSTGRES
|
|
|
|
- POSTGRES_PASSWORD=$SERVICE_PASSWORD_POSTGRES
|
|
|
|
- POSTGRES_DB=${POSTGRES_DB:-sonar}
|
|
|
|
healthcheck:
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
|
|
|
|
interval: 5s
|
|
|
|
timeout: 20s
|
|
|
|
retries: 10
|
|
|
|
|