I want to know if there is a way to start the SonarQube (5.0.1) server with external sonar.properties and wrapper.conf files.
I am looking at something similar to the apache "-f" option -
/apache2/bin/apachectl -f /path/to/httpd.conf
Thank.
==================================================== ======
As mentioned in the answer below, I tried to reference properties with environment variables. This works for certain properties. ex. sonar.jdbc.username and sonar.jdbc.password
This did not work for me as a property value that has several environment variables.
Ex. sonar.jdbc.url = JDBC: MySQL: // $ {ENV: MYSQL_HOST}: $ {ENV: MYSQL_PORT} / sonar =? UseUnicode = true & characterEncoding = UTF8 & rewriteBatchedStatements = true
Here is the exception I get -
2015.03.17 11:48:33 INFO web[o.s.c.p.Database] Create JDBC datasource for= jdbc:mysql://${env:MYSQL_HOST}:${env:MYSQL_PORT}/sonar?useUnicode=3Dtrue&c=
haracterEncoding=3Dutf8&rewriteBatchedStatements=3Dtrue
2015.03.17 11:48:33 ERROR web[o.a.c.c.C.[.[.[/sonar]] Exception sending co= ntext initialized event to listener instance of class org.sonar.server.plat= form.PlatformServletContextListener
java.lang.IllegalStateException: Can not connect to database. Please check = connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
=============================================== ===========
env -
$echo $MYSQL_DB_URL
jdbc:mysql://devdbXXX:6000/sonar?useUnicode=true
-
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http:
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
WrapperSimpleApp: Encountered an error running main: org.sonar.process.MessageException: Bad format of JDBC URL: ${env:MYSQL_DB_URL}
org.sonar.process.MessageException: Bad format of JDBC URL: ${env:MYSQL_DB_URL}
<-- Wrapper Stopped
, URL- mysql.
-, URL-, ...