-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.example.yml
49 lines (46 loc) · 1.35 KB
/
docker-compose.example.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
services:
sonarqube_db:
image: bitnami/postgresql:16
container_name: sonarqube_db
environment:
- POSTGRESQL_PORT_NUMBER=5432
- POSTGRESQL_USERNAME=sonar
- POSTGRESQL_PASSWORD=sonar
- POSTGRESQL_DATABASE=sonardb
volumes:
- sonarqube_db:/bitnami/postgresql
sonarqube:
image: adrianmusante/sonarqube # Recommended to specify a tag with a major or minor version (e.g., 10 or 10.6)
container_name: sonarqube
depends_on:
- sonarqube_db
environment:
- SONARQUBE_DATABASE_HOST=sonarqube_db
- SONARQUBE_DATABASE_PORT_NUMBER=5432
- SONARQUBE_DATABASE_NAME=sonardb
- SONARQUBE_DATABASE_USER=sonar
- SONARQUBE_DATABASE_PASSWORD=sonar
- SONARQUBE_USERNAME=${SONARQUBE_USERNAME:-admin}
- SONARQUBE_PASSWORD=${SONARQUBE_PASSWORD:-admin123}
ports:
- "9000:9000"
volumes:
- sonarqube:/bitnami/sonarqube
healthcheck:
# if SONARQUBE_SKIP_MIGRATION is set to true, it is recommended to use:
# test: health-check -s DB_MIGRATION_NEEDED -s DB_MIGRATION_RUNNING
test: health-check # in normal use
start_period: 3m
start_interval: 10s
interval: 1m
timeout: 10s
retries: 3
networks:
default:
name: sonarqube_network
driver: bridge
volumes:
sonarqube_db:
driver: local
sonarqube:
driver: local