forked from webpwnized/mutillidae
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
44 lines (41 loc) · 1.12 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
services:
sonar-server:
image: sonarqube:latest
container_name: sonar-server
ports:
- "9000:9000" # Expose port 9000 for SonarQube
networks:
- sonarnet
environment:
- SONAR_JDBC_URL=jdbc:postgresql://db:5432/sonarqube
- SONAR_JDBC_USERNAME=sonar
- SONAR_JDBC_PASSWORD=sonar
db:
image: postgres:latest
container_name: sonar-db
networks:
- sonarnet
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
- POSTGRES_DB=sonarqube
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:9000 || exit 1"]
interval: 30s
timeout: 10s
retries: 10
sonar-scanner:
image: sonarsource/sonar-scanner-cli:latest
depends_on:
- sonar-server
networks:
- sonarnet
environment:
- SONAR_HOST_URL=http://sonar-server:9000
- SONAR_TOKEN=${SONAR_TOKEN}
volumes:
- .:/usr/src
entrypoint: ["/bin/bash", "-c", "sonar-scanner -X -Dsonar.projectKey=Mutillidae-II-2 -Dsonar.sources=."]
networks:
sonarnet:
driver: bridge # This defines the 'sonarnet' network with the bridge driver