dokku apps:create sonar
dokku postgres:create sonar_postgres
dokku postgres:link sonar_postgres sonar
If you use dokku-limit, you need to increase the limit
dokku limit:set sonar web memory=2G
In your local
git clone
git remote add dokku dokku@yourinstance
git push dokku
View variable of postgres
dokku postgres:info sonar_postgres
Manual bind
dokku config:set sonar SONARQUBE_JDBC_URL=jdbc:postgresql://dokku-postgres-sonar-postgres/sonar_postgres SONARQUBE_JDBC_USERNAME=postgres SONARQUBE_JDBC_PASSWORD={$put-password-of-bind}
mkdir /var/lib/dokku/data/storage/sonar
dokku storage:mount sonar /var/lib/dokku/data/storage/sonar/downloads:/opt/sonarqube/extensions/downloads
dokku storage:mount sonar /var/lib/dokku/data/storage/sonar/plugins:/opt/sonarqube/extensions/plugins
dokku ps:restart sonar