2024-04-22 05:01:37 -04:00
|
|
|
#!/bin/sh
|
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)
|
|
|
|
|
2024-05-17 03:52:09 -04:00
|
|
|
if [ -z "$GIT_BRIDGE_JVM_ARGS" ]; then
|
2021-06-23 07:43:00 -04:00
|
|
|
GIT_BRIDGE_JVM_ARGS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=50.0"
|
|
|
|
fi
|
|
|
|
|
2024-05-17 03:52:09 -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
|