-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose-h2.yml
More file actions
62 lines (60 loc) · 1.73 KB
/
Copy pathdocker-compose-h2.yml
File metadata and controls
62 lines (60 loc) · 1.73 KB
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
---
services:
sonarqube:
build:
context: .
dockerfile: Dockerfile
args:
BUILD_DATE: ${BUILD_DATE:-$(date -u +'%Y-%m-%dT%H:%M:%SZ')}
BUILD_VERSION: ${BUILD_VERSION:-2025.3}
VCS_REF: ${VCS_REF:-$(git rev-parse --short HEAD)}
image: sonarqube-enhanced:latest
container_name: sonarqube-2025-h2
restart: unless-stopped
ports:
- "9000:9000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/api/system/status"]
interval: 30s
timeout: 10s
retries: 5
start_period: 300s
environment:
# Use H2 embedded database (only for testing/development)
- SONAR_EMBEDDEDDATABASE_PORT=9092
# Elasticsearch configuration - Fix memory settings
- SONAR_ES_BOOTSTRAP_CHECKS_DISABLE=true
- SONAR_SEARCH_JAVAOPTS=-Xms512m -Xmx512m -XX:MaxDirectMemorySize=256m
- SONAR_SEARCH_JAVA_ADDITIONAL_OPTS=-Des.enforce.bootstrap.checks=false -Des.discovery.type=single-node
# Web and CE memory settings
- SONAR_WEB_JAVAOPTS=-Xmx512m -Xms256m
- SONAR_CE_JAVAOPTS=-Xmx512m -Xms256m
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_logs:/opt/sonarqube/logs
- sonarqube_temp:/opt/sonarqube/temp
- sonarqube_reports:/opt/sonarqube/reports
networks:
- sonarqube-network
networks:
sonarqube-network:
driver: bridge
volumes:
sonarqube_data:
driver: local
sonarqube_extensions:
driver: local
sonarqube_logs:
driver: local
sonarqube_temp:
driver: local
sonarqube_reports:
driver: local