diff --git a/apps/sonarqube/10.5.0-community/data.yml b/apps/sonarqube/10.5.0-community/data.yml new file mode 100644 index 00000000..3ca246c0 --- /dev/null +++ b/apps/sonarqube/10.5.0-community/data.yml @@ -0,0 +1,48 @@ +additionalProperties: + formFields: + - child: + default: "" + envKey: PANEL_DB_HOST + required: true + type: service + default: postgresql + envKey: PANEL_DB_TYPE + labelEn: Database Service + labelZh: 数据库服务 + required: true + type: apps + values: + - label: PostgreSQL + value: postgresql + - default: sonarqube + envKey: PANEL_DB_NAME + labelEn: Database + labelZh: 数据库名 + random: true + required: true + rule: paramCommon + type: text + - default: sonarqube + envKey: PANEL_DB_USER + labelEn: User + labelZh: 数据库用户 + random: true + required: true + rule: paramCommon + type: text + - default: sonarqube + envKey: PANEL_DB_USER_PASSWORD + labelEn: Password + labelZh: 数据库用户密码 + random: true + required: true + rule: paramComplexity + type: password + - default: 9000 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number diff --git a/apps/sonarqube/10.5.0-community/data/data/.gitkeep b/apps/sonarqube/10.5.0-community/data/data/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/sonarqube/10.5.0-community/data/extensions/.gitkeep b/apps/sonarqube/10.5.0-community/data/extensions/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/sonarqube/10.5.0-community/data/logs/.gitkeep b/apps/sonarqube/10.5.0-community/data/logs/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/sonarqube/10.5.0-community/docker-compose.yml b/apps/sonarqube/10.5.0-community/docker-compose.yml new file mode 100644 index 00000000..c9dfd4e3 --- /dev/null +++ b/apps/sonarqube/10.5.0-community/docker-compose.yml @@ -0,0 +1,22 @@ +services: + sonarqube: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + image: sonarqube:10.5.0-community + ports: + - ${PANEL_APP_PORT_HTTP}:9000 + volumes: + - ./data/data:/opt/sonarqube/data + - ./data/extensions:/opt/sonarqube/extensions + - ./data/logs:/opt/sonarqube/logs + environment: + SONAR_JDBC_URL: jdbc:${PANEL_DB_TYPE}://${PANEL_DB_HOST}:${PANEL_DB_PORT}/${PANEL_DB_NAME} + SONAR_JDBC_USERNAME: ${PANEL_DB_USER} + SONAR_JDBC_PASSWORD: ${PANEL_DB_USER_PASSWORD} + labels: + createdBy: "Apps" +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/sonarqube/10.5.0-community/scripts/init.sh b/apps/sonarqube/10.5.0-community/scripts/init.sh new file mode 100644 index 00000000..445f83b2 --- /dev/null +++ b/apps/sonarqube/10.5.0-community/scripts/init.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f "/etc/sysctl.conf" ]; then + grep -qxF 'vm.max_map_count=262144' /etc/sysctl.conf || echo 'vm.max_map_count=262144' >> /etc/sysctl.conf + sysctl -p /etc/sysctl.conf >/dev/null +else + sysctl -w vm.max_map_count=262144 +fi + +chown -R 1000:1000 data \ No newline at end of file diff --git a/apps/sonarqube/9.9.4-community/data.yml b/apps/sonarqube/9.9.4-community/data.yml new file mode 100644 index 00000000..3ca246c0 --- /dev/null +++ b/apps/sonarqube/9.9.4-community/data.yml @@ -0,0 +1,48 @@ +additionalProperties: + formFields: + - child: + default: "" + envKey: PANEL_DB_HOST + required: true + type: service + default: postgresql + envKey: PANEL_DB_TYPE + labelEn: Database Service + labelZh: 数据库服务 + required: true + type: apps + values: + - label: PostgreSQL + value: postgresql + - default: sonarqube + envKey: PANEL_DB_NAME + labelEn: Database + labelZh: 数据库名 + random: true + required: true + rule: paramCommon + type: text + - default: sonarqube + envKey: PANEL_DB_USER + labelEn: User + labelZh: 数据库用户 + random: true + required: true + rule: paramCommon + type: text + - default: sonarqube + envKey: PANEL_DB_USER_PASSWORD + labelEn: Password + labelZh: 数据库用户密码 + random: true + required: true + rule: paramComplexity + type: password + - default: 9000 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Port + labelZh: 端口 + required: true + rule: paramPort + type: number diff --git a/apps/sonarqube/9.9.4-community/data/data/.gitkeep b/apps/sonarqube/9.9.4-community/data/data/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/sonarqube/9.9.4-community/data/extensions/.gitkeep b/apps/sonarqube/9.9.4-community/data/extensions/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/sonarqube/9.9.4-community/data/logs/.gitkeep b/apps/sonarqube/9.9.4-community/data/logs/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/apps/sonarqube/9.9.4-community/docker-compose.yml b/apps/sonarqube/9.9.4-community/docker-compose.yml new file mode 100644 index 00000000..75874ab9 --- /dev/null +++ b/apps/sonarqube/9.9.4-community/docker-compose.yml @@ -0,0 +1,22 @@ +services: + sonarqube: + container_name: ${CONTAINER_NAME} + restart: always + networks: + - 1panel-network + image: sonarqube:9.9.4-community + ports: + - ${PANEL_APP_PORT_HTTP}:9000 + volumes: + - ./data/data:/opt/sonarqube/data + - ./data/extensions:/opt/sonarqube/extensions + - ./data/logs:/opt/sonarqube/logs + environment: + SONAR_JDBC_URL: jdbc:${PANEL_DB_TYPE}://${PANEL_DB_HOST}:${PANEL_DB_PORT}/${PANEL_DB_NAME} + SONAR_JDBC_USERNAME: ${PANEL_DB_USER} + SONAR_JDBC_PASSWORD: ${PANEL_DB_USER_PASSWORD} + labels: + createdBy: "Apps" +networks: + 1panel-network: + external: true \ No newline at end of file diff --git a/apps/sonarqube/9.9.4-community/scripts/init.sh b/apps/sonarqube/9.9.4-community/scripts/init.sh new file mode 100644 index 00000000..445f83b2 --- /dev/null +++ b/apps/sonarqube/9.9.4-community/scripts/init.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +if [ -f "/etc/sysctl.conf" ]; then + grep -qxF 'vm.max_map_count=262144' /etc/sysctl.conf || echo 'vm.max_map_count=262144' >> /etc/sysctl.conf + sysctl -p /etc/sysctl.conf >/dev/null +else + sysctl -w vm.max_map_count=262144 +fi + +chown -R 1000:1000 data \ No newline at end of file diff --git a/apps/sonarqube/README.md b/apps/sonarqube/README.md new file mode 100644 index 00000000..ece826ad --- /dev/null +++ b/apps/sonarqube/README.md @@ -0,0 +1,19 @@ +# 默认账户密码 + +``` +username:admin +password:admin +``` + +# SonarQube + +**SonarQube** 是一个开源的代码质量管理平台,用于静态代码分析、代码质量管理和持续集成的工具。它提供了一系列功能,帮助开发团队发现、跟踪和修复代码中的技术债务和缺陷,以提高代码的可维护性、可靠性和安全性。 + +## 主要功能 + +- **静态代码分析**:发现和修复代码中的质量问题。 +- **代码质量度量**:提供各种度量指标,评估代码质量水平。 +- **问题追踪和管理**:记录和管理代码中的问题和缺陷。 +- **持续集成支持**:与持续集成工具集成,实现自动化代码分析。 +- **代码仓库集成**:与版本控制系统集成,方便获取源代码。 +- **多语言支持**:适用于多种编程语言项目。 diff --git a/apps/sonarqube/data.yml b/apps/sonarqube/data.yml new file mode 100755 index 00000000..ca6ca5fb --- /dev/null +++ b/apps/sonarqube/data.yml @@ -0,0 +1,19 @@ +name: SonarQube +tags: + - DevOps +title: 开源的代码质量管理平台 +description: 开源的代码质量管理平台 +additionalProperties: + key: sonarqube + name: SonarQube + tags: + - DevOps + shortDescZh: 开源的代码质量管理平台 + shortDescEn: An open-source code quality management platform" + type: tool + crossVersionUpdate: false + limit: 0 + recommend: 0 + website: https://www.sonarsource.com + github: https://github.com/SonarSource/sonarqube + document: https://docs.sonarsource.com/sonarqube diff --git a/apps/sonarqube/logo.png b/apps/sonarqube/logo.png new file mode 100644 index 00000000..fbbe5e02 Binary files /dev/null and b/apps/sonarqube/logo.png differ diff --git a/renovate.json b/renovate.json index eef6eea3..0a6cd0c0 100644 --- a/renovate.json +++ b/renovate.json @@ -78,6 +78,14 @@ "matchFileNames": ["apps/mongodb/7.*/*.yml"], "allowedVersions": "/^7.*/" }, + { + "matchFileNames": ["apps/sonarqube/9.*/*.yml"], + "allowedVersions": "/^9.*/" + }, + { + "matchFileNames": ["apps/sonarqube/10.*/*.yml"], + "allowedVersions": "/^10.*/" + }, { "matchDatasources": ["docker"], "matchPackageNames": ["ghcr.io/umami-software/umami"],