2021-04-30 10:47:07 -04:00
|
|
|
#!/bin/bash
|
2021-06-23 09:58:25 -04:00
|
|
|
|
2021-05-07 04:44:29 -04:00
|
|
|
/opt/envsubst < /envsubst_template.json > /conf/runtime.json
|
2021-06-23 07:43:00 -04:00
|
|
|
|
2021-06-24 11:12:31 -04:00
|
|
|
VERSION=$(date +%y%m%d%H%M%S)
|
|
|
|
|
2021-06-23 07:43:00 -04:00
|
|
|
if [ "x$GIT_BRIDGE_JVM_ARGS" == "x" ]; then
|
|
|
|
GIT_BRIDGE_JVM_ARGS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=50.0"
|
|
|
|
fi
|
|
|
|
|
2021-06-23 09:58:25 -04:00
|
|
|
if [ "$ENABLE_PROFILE_AGENT" == "true" ]; then
|
2021-06-24 11:12:31 -04:00
|
|
|
GIT_BRIDGE_JVM_ARGS="-agentpath:/opt/cprof/profiler_java_agent.so=-cprof_service=git-bridge,-cprof_service_version=${VERSION},-cprof_enable_heap_sampling=true ${GIT_BRIDGE_JVM_ARGS}"
|
2021-06-23 09:58:25 -04:00
|
|
|
fi
|
|
|
|
|
2021-06-23 07:43:00 -04:00
|
|
|
exec java $GIT_BRIDGE_JVM_ARGS -jar /git-bridge.jar /conf/runtime.json
|