-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
42 lines (39 loc) · 1.01 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
version: "3"
services:
sonarqube:
image: sonarqube:${SONAR_VERSION}
ports:
- "9000:9000"
- "9092:9092"
networks:
- sonarnet
environment:
- SONARQUBE_JDBC_URL=jdbc:postgresql://db/sonarqube
- SONARQUBE_JDBC_USERNAME=${SONAR_JDBC_USERNAME}
- SONARQUBE_JDBC_PASSWORD=${SONAR_JDBC_PASSWORD}
volumes:
- ${SONAR_HOME}/conf:/opt/sonarqube/conf
- ${SONAR_HOME}/data:/opt/sonarqube/data
- ${SONAR_HOME}/extensions:/opt/sonarqube/extensions
- ${SONAR_HOME}/bundled-plugins:/opt/sonarqube/lib/bundled-plugins
depends_on:
- db
restart: "unless-stopped"
db:
image: postgres:11-alpine
environment:
POSTGRES_DB: sonarqube
POSTGRES_PASSWORD: ${SONAR_JDBC_PASSWORD}
POSTGRES_USER: ${SONAR_JDBC_USERNAME}
networks:
- sonarnet
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"
restart: unless-stopped
volumes:
- ${SONAR_HOME}/db:/var/lib/postgresql/data
networks:
sonarnet: