-
Notifications
You must be signed in to change notification settings - Fork 19
/
docker-compose.yml
91 lines (85 loc) · 3 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: "3.3"
services:
mongodb:
image: mongo:latest
restart: on-failure
container_name: mongo-ecosonar
networks:
- sonarnet
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: mongodb
MONGO_INITDB_ROOT_PASSWORD: mongodb
volumes:
- mongodb_data:/data
- ./docker-compose/docker-entrypoint-initdb.d/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
api-ecosonar:
build: ./EcoSonar-API
container_name: ecosonar_api
ports:
- "3000:3000"
networks:
- sonarnet
depends_on:
- mongodb
environment:
ECOSONAR_ENV_CLOUD_PROVIDER: local
ECOSONAR_ENV_DB_NAME: EcoSonar
ECOSONAR_ENV_DB_TYPE: MongoDB
ECOSONAR_ENV_CLUSTER: ecosonar:ecosonar@mongodb
ECOSONAR_ENV_SONARQUBE_SERVER_URL: http://localhost:9000
ECOSONAR_ENV_LOCAL_DEV_SERVER_URL: http://localhost:3000
restart: unless-stopped
sonar:
image: sonarqube:lts-community
container_name: ecosonar_sonarqube
ports:
- "9000:9000"
networks:
- sonarnet
depends_on:
- db
- api-ecosonar
environment:
SONAR_JDBC_USERNAME: sonar
SONAR_JDBC_PASSWORD: sonar
SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonarqube
SONAR_ES_BOOTSTRAP_CHECKS_DISABLE: 'true'
volumes:
- ./EcoSonar-SonarQube/target/:/opt/sonarqube/extensions/plugins/
- ./EcoSonar-SonarQube/ecocode/ecocode-android-1.1.0.jar:/opt/sonarqube/extensions/plugins/ecocode-android-1.1.0.jar
- ./EcoSonar-SonarQube/ecocode/ecocode-ios-1.1.0.jar:/opt/sonarqube/extensions/plugins/ecocode-ios-1.1.0.jar:ro
- ./EcoSonar-SonarQube/ecocode/ecocode-java-plugin-1.6.2.jar:/opt/sonarqube/extensions/plugins/ecocode-java-plugin-1.6.2.jar:ro
- ./EcoSonar-SonarQube/ecocode/ecocode-javascript-plugin-1.5.0.jar:/opt/sonarqube/extensions/plugins/ecocode-javascript-plugin-1.5.0.jar:ro
- ./EcoSonar-SonarQube/ecocode/ecocode-php-plugin-1.5.1.jar:/opt/sonarqube/extensions/plugins/ecocode-php-plugin-1.5.1.jar:ro
- ./EcoSonar-SonarQube/ecocode/ecocode-python-plugin-1.4.4.jar:/opt/sonarqube/extensions/plugins/ecocode-python-plugin-1.4.4.jar:ro
- ./EcoSonar-SonarQube/ecocode/ecocode-csharp-plugin-1.1.0.jar:/opt/sonarqube/extensions/plugins/ecocode-csharp-plugin-1.1.0.jar:ro
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_logs:/opt/sonarqube/logs
- sonarqube_data:/opt/sonarqube/data
restart: unless-stopped
db:
image: postgres:13
container_name: ecosonar_postgresql
networks:
- sonarnet
volumes:
- postgresql:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: sonar
POSTGRES_PASSWORD: sonar
POSTGRES_DB: sonarqube
PGDATA: postgresql_data:/var/lib/postgresql/data/pgdata
restart: unless-stopped
networks:
sonarnet:
driver: bridge
volumes:
sonarqube_data:
sonarqube_logs:
sonarqube_extensions:
postgresql:
postgresql_data:
mongodb_data: