forked from stakater-docker/sonarqube
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·28 lines (22 loc) · 860 Bytes
/
run.sh
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
#!/bin/bash
set -e
if [ "${1:0:1}" != '-' ]; then
exec "$@"
fi
# Create extensions directories to enable usage after volume mounting
mkdir -p ${SONARQUBE_HOME}/extensions/plugins ${SONARQUBE_HOME}/extensions/jdbc-driver
# Install plugins from download dir
mv ${HOME}/downloads/plugins/* ${SONARQUBE_HOME}/extensions/plugins
# Move conf from temp mount path to conf location
if [ -f ${CONF_MOUNT_PATH} ];
then
rm -f ${SONARQUBE_HOME}/conf/sonar.properties
mv ${CONF_MOUNT_PATH} ${SONARQUBE_HOME}/conf/
fi
exec java -jar lib/sonar-application-$SONAR_VERSION.jar \
-Dsonar.log.console=true \
-Dsonar.jdbc.username="$SONARQUBE_JDBC_USERNAME" \
-Dsonar.jdbc.password="$SONARQUBE_JDBC_PASSWORD" \
-Dsonar.jdbc.url="$SONARQUBE_JDBC_URL" \
-Dsonar.web.javaAdditionalOpts="$SONARQUBE_WEB_JVM_OPTS -Djava.security.egd=file:/dev/./urandom" \
"$@"