如何在 Heroku Dyno 上部署 Sonarqube 服务器
How to deploy Sonarqube Server on Heroku Dyno
我必须在 Heroku Web Dyno 上部署一个 SonarQube 服务器。
为此,我尝试了以下项目:
从以下位置下载了 SonarQube 社区版
https://www.sonarqube.org/downloads/
然后解压文件夹进入/sonarqube-7.8/文件夹
- 然后我创建了包含以下内容的 Procfile:
web: chmod u+x bin/linux-x86-64/sonar.sh &&
./bin/linux-x86-64/sonar.sh
- 然后我创建了包含以下内容的 system.properties 文件:
java.runtime.version=1.8
- 然后我 运行 下面的命令检查 Heroku 上的 SonarQube 服务器 Git 和
运行 服务器:
git init
git add.
git commit -m "initial commit"
git push heroku master
git bash 控制台在 运行 上述命令后显示以下内容:
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 4 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 391 bytes | 39.00 KiB/s, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> SonarQubeFramework app detected
remote: -----> Create setupSonar.sh
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 195.5M
remote: -----> Launching...
remote: Released v8
remote: https://<app_name>.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/<app_name>.git
cad2f14..55d4bcd master -> master
而且我从 heroku 上获得了以下日志
2019-06-28T10:54:19.321815+00:00 heroku[web.1]: Starting process with command `chmod u+x bin/linux-x86-64/sonar.sh && ./bin/linux-x86-64/sonar.sh`
2019-06-28T10:54:21.360549+00:00 heroku[web.1]: Process exited with status 1
2019-06-28T10:54:21.380868+00:00 heroku[web.1]: State changed from starting to crashed
2019-06-28T10:54:21.313195+00:00 app[web.1]: Usage: ./bin/linux-x86-64/sonar.sh { console | start | stop | force-stop | restart | status | dump }
谁能帮我在 Heroku Cloud 上部署 SonarQube 服务器?
我能够在 Heroku Cloud 上部署 SonarQube 服务器:
以下是按相同顺序执行的命令:
heroku create <appName>
heroku addons:create heroku-postgresql:hobby-dev -a <appName>
heroku buildpacks:set https://github.com/NayaraCaetano/heroku-buildpack-sonarqube.git -a <appName>
mkdir <appName> && cd <appName>
touch README
git init
heroku git:remote -a <appName>
git add .
git commit -am "initial commit"
git push heroku master
heroku dyno:resize performance-m -a <appName>
Note: You have to use performance-m dyno (which is not free) on Heroku due to some memory constraints. Also free version of
Postgres will get exhausted within 1 or 2 scans, so you have to
upgrade it as per your need.
我必须在 Heroku Web Dyno 上部署一个 SonarQube 服务器。
为此,我尝试了以下项目:
从以下位置下载了 SonarQube 社区版 https://www.sonarqube.org/downloads/
然后解压文件夹进入/sonarqube-7.8/文件夹
- 然后我创建了包含以下内容的 Procfile:
web: chmod u+x bin/linux-x86-64/sonar.sh && ./bin/linux-x86-64/sonar.sh
- 然后我创建了包含以下内容的 system.properties 文件:
java.runtime.version=1.8
- 然后我 运行 下面的命令检查 Heroku 上的 SonarQube 服务器 Git 和 运行 服务器:
git init git add. git commit -m "initial commit" git push heroku master
git bash 控制台在 运行 上述命令后显示以下内容:
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 4 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 391 bytes | 39.00 KiB/s, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> SonarQubeFramework app detected
remote: -----> Create setupSonar.sh
remote: -----> Discovering process types
remote: Procfile declares types -> web
remote:
remote: -----> Compressing...
remote: Done: 195.5M
remote: -----> Launching...
remote: Released v8
remote: https://<app_name>.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/<app_name>.git
cad2f14..55d4bcd master -> master
而且我从 heroku 上获得了以下日志
2019-06-28T10:54:19.321815+00:00 heroku[web.1]: Starting process with command `chmod u+x bin/linux-x86-64/sonar.sh && ./bin/linux-x86-64/sonar.sh`
2019-06-28T10:54:21.360549+00:00 heroku[web.1]: Process exited with status 1
2019-06-28T10:54:21.380868+00:00 heroku[web.1]: State changed from starting to crashed
2019-06-28T10:54:21.313195+00:00 app[web.1]: Usage: ./bin/linux-x86-64/sonar.sh { console | start | stop | force-stop | restart | status | dump }
谁能帮我在 Heroku Cloud 上部署 SonarQube 服务器?
我能够在 Heroku Cloud 上部署 SonarQube 服务器: 以下是按相同顺序执行的命令:
heroku create <appName>
heroku addons:create heroku-postgresql:hobby-dev -a <appName>
heroku buildpacks:set https://github.com/NayaraCaetano/heroku-buildpack-sonarqube.git -a <appName>
mkdir <appName> && cd <appName>
touch README
git init
heroku git:remote -a <appName>
git add .
git commit -am "initial commit"
git push heroku master
heroku dyno:resize performance-m -a <appName>
Note: You have to use performance-m dyno (which is not free) on Heroku due to some memory constraints. Also free version of Postgres will get exhausted within 1 or 2 scans, so you have to upgrade it as per your need.