sonarqube/docker-compose.yml
Guillaume "B.B." Van Hemmen c6ad73c8fa #0000 - Update SonarQube image to version 10.7-community
This change updates the SonarQube image used in the `docker-compose.yml` file from version 10.4-community to 10.7-community. The update ensures that we are using the latest features and security patches provided by SonarQube.
2024-10-13 17:41:44 +02:00

60 lines
1.7 KiB
YAML

networks:
network:
traefik_network:
external: true
volumes:
postgresql:
postgresql_data:
services:
app:
image: sonarqube:10.7-community
depends_on:
postgresql:
condition: service_healthy
labels:
- "traefik.docker.network=traefik_network"
- "traefik.enable=true"
- "traefik.http.routers.sonarqube.rule=Host(`${SONAR_FQDN}`)"
- "traefik.http.routers.sonarqube.entrypoints=websecure"
- "traefik.http.routers.sonarqube.tls.certresolver=myresolver"
networks:
- traefik_network
- network
volumes:
# https://github.com/mc1arke/sonarqube-community-branch-plugin
- ./plugins/sonarqube-community-branch-plugin-1.19.0.jar:/opt/sonarqube/extensions/plugins/sonarqube-branch-plugin.jar
environment:
- SONAR_JDBC_USERNAME=${POSTGRES_USERNAME}
- SONAR_JDBC_PASSWORD=${POSTGRES_PASSWORD}
- SONAR_JDBC_URL=jdbc:postgresql://postgresql:5432/sonar
- SONAR_WEB_JAVAADDITIONALOPTS=-javaagent:./extensions/plugins/sonarqube-branch-plugin.jar=web
- SONAR_CE_JAVAADDITIONALOPTS=-javaagent:./extensions/plugins/sonarqube-branch-plugin.jar=ce
deploy:
replicas: 1
restart_policy:
condition: any
delay: 5s
postgresql:
image: postgres:11
networks:
- network
environment:
- POSTGRES_USER=${POSTGRES_USERNAME}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- postgresql:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
deploy:
replicas: 1
restart_policy:
condition: any
delay: 5s
healthcheck:
test: [ "CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USERNAME} -d sonar'" ]
interval: 1s
timeout: 5s
retries: 10