-
-
Notifications
You must be signed in to change notification settings - Fork 524
/
docker-compose.yml
50 lines (48 loc) · 1.14 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
services:
sonarqube:
depends_on:
db:
condition: service_healthy
image: mc1arke/sonarqube-with-community-branch-plugin:${SONARQUBE_VERSION}
build:
context: .
dockerfile: ${DOCKERFILE}
args:
SONARQUBE_VERSION: ${SONARQUBE_VERSION}
PLUGIN_VERSION: ${PLUGIN_VERSION}
container_name: sonarqube
ports:
- "9000:9000"
networks:
- sonarnet
environment:
- SONAR_JDBC_URL=jdbc:postgresql://db:5432/sonar
- SONAR_JDBC_USERNAME=sonar
- SONAR_JDBC_PASSWORD=sonar
volumes:
- sonarqube_conf:/opt/sonarqube/conf
- sonarqube_data:/opt/sonarqube/data
db:
image: postgres:16
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U sonar" ]
interval: 10s
timeout: 5s
retries: 5
hostname: db
container_name: postgres
networks:
- sonarnet
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
volumes:
- postgresql:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
volumes:
sonarqube_conf:
sonarqube_data:
postgresql:
postgresql_data:
networks:
sonarnet: