Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Java/base image and added DCE images #461

Merged
merged 8 commits into from
Feb 11, 2021
Prev Previous commit
Next Next commit
log into separated directories
  • Loading branch information
tobias-trabelsi-sonarsource committed Feb 1, 2021
commit 04969d415ffd2d96bcf4d130990a8a28fe5b8b4b
14 changes: 13 additions & 1 deletion 8/datacenter/app/sonar.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#!/usr/bin/env bash
IP=$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
exec java -jar lib/sonar-application-"${SONAR_VERSION}".jar -Dsonar.log.console=true -Dsonar.log.console=true -Dsonar.cluster.node.host=${IP} "$@"
HOSTNAME=$(hostname)
if [ -z "$SONAR_PATH_LOGS" ]
then
SONAR_CLUSTER_PATH_LOGS="logs/${HOSTNAME}"
mkdir -p ${SONARQUBE_HOME}/${SONAR_CLUSTER_PATH_LOGS}
chown -R sonarqube:sonarqube ${SONARQUBE_HOME}/${SONAR_CLUSTER_PATH_LOGS}
else
SONAR_CLUSTER_PATH_LOGS="${SONAR_PATH_LOGS}/${HOSTNAME}"
mkdir -p ${SONAR_CLUSTER_PATH_LOGS}
chown -R sonarqube:sonarqube ${SONAR_CLUSTER_PATH_LOGS}
fi

exec java -jar lib/sonar-application-"${SONAR_VERSION}".jar -Dsonar.log.console=true -Dsonar.log.console=true -Dsonar.cluster.node.host=${IP} -Dsonar.path.logs=${SONAR_CLUSTER_PATH_LOGS} "$@"
14 changes: 13 additions & 1 deletion 8/datacenter/search/sonar.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
#!/usr/bin/env bash
IP=$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
exec java -jar lib/sonar-application-"${SONAR_VERSION}".jar -Dsonar.log.console=true -Dsonar.log.console=true -Dsonar.cluster.node.search.host=${IP} -Dsonar.cluster.node.es.host=${IP} -Dsonar.cluster.node.host=${IP} "$@"
HOSTNAME=$(hostname)
if [ -z "$SONAR_PATH_LOGS" ]
then
SONAR_CLUSTER_PATH_LOGS="logs/${HOSTNAME}"
mkdir -p ${SONARQUBE_HOME}/${SONAR_CLUSTER_PATH_LOGS}
chown -R sonarqube:sonarqube ${SONARQUBE_HOME}/${SONAR_CLUSTER_PATH_LOGS}
else
SONAR_CLUSTER_PATH_LOGS="${SONAR_PATH_LOGS}/${HOSTNAME}"
mkdir -p ${SONAR_CLUSTER_PATH_LOGS}
chown -R sonarqube:sonarqube ${SONAR_CLUSTER_PATH_LOGS}
fi

exec java -jar lib/sonar-application-"${SONAR_VERSION}".jar -Dsonar.log.console=true -Dsonar.log.console=true -Dsonar.cluster.node.search.host=${IP} -Dsonar.cluster.node.es.host=${IP} -Dsonar.cluster.node.host=${IP} -Dsonar.path.logs=${SONAR_CLUSTER_PATH_LOGS} "$@"