2023-04-28 00:32:36 +02:00
|
|
|
# sonarqube docker compose
|
|
|
|
version: '3.9'
|
|
|
|
services:
|
|
|
|
sonarqube:
|
|
|
|
image: "{{ sonarqube_image }}"
|
|
|
|
restart: always
|
2023-04-28 18:05:50 +02:00
|
|
|
healthcheck:
|
|
|
|
test: wget -qO- http://localhost:9000/api/system/health
|
|
|
|
interval: 10s
|
|
|
|
retries: 5
|
|
|
|
start_period: 5s
|
|
|
|
timeout: 10s
|
2023-04-28 00:32:36 +02:00
|
|
|
env_file:
|
|
|
|
- "{{ sonarqube_config_path | expanduser }}/env.sonarqube.conf"
|
|
|
|
ports:
|
2023-04-28 01:10:21 +02:00
|
|
|
- "{{ sonarqube_http_port }}:9000"
|
|
|
|
- "{{ sonarqube_api_port }}:9001"
|
2023-04-28 00:32:36 +02:00
|
|
|
networks:
|
|
|
|
- sonarqube-net
|
|
|
|
volumes:
|
|
|
|
- sonarqube_conf:/opt/sonarqube/conf
|
|
|
|
- sonarqube_data:/opt/sonarqube/data
|
|
|
|
- sonarqube_extensions:/opt/sonarqube/extensions
|
|
|
|
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
|
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
|
|
|
|
db:
|
2023-04-28 01:10:21 +02:00
|
|
|
image: "{{ sonarqube_db_image }}"
|
2023-04-28 00:32:36 +02:00
|
|
|
restart: always
|
2023-04-28 18:05:50 +02:00
|
|
|
healthcheck:
|
2023-04-28 18:37:47 +02:00
|
|
|
test: /usr/bin/pg_isready -U "{{ sonarqube_db_user }}""
|
2023-04-28 18:05:50 +02:00
|
|
|
interval: 5s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 120
|
2023-04-28 00:32:36 +02:00
|
|
|
env_file:
|
|
|
|
- "{{ sonarqube_config_path | expanduser }}/env.db.conf"
|
|
|
|
volumes:
|
|
|
|
- sonarqube_db:/var/lib/postgresql
|
|
|
|
- postgresql_data:/var/lib/postgresql/data
|
2023-04-28 01:10:21 +02:00
|
|
|
networks:
|
|
|
|
- sonarqube-net
|
2023-04-28 00:32:36 +02:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
postgresql_data:
|
|
|
|
sonarqube_bundled-plugins:
|
|
|
|
sonarqube_conf:
|
|
|
|
sonarqube_data:
|
|
|
|
sonarqube_db:
|
|
|
|
sonarqube_extensions:
|
|
|
|
|
|
|
|
networks:
|
2023-04-28 01:12:26 +02:00
|
|
|
sonarqube-net: {}
|