2024-04-22 09:01:37 +00:00
|
|
|
#!/bin/sh
|
2021-06-23 13:58:25 +00:00
|
|
|
|
2021-05-07 08:44:29 +00:00
|
|
|
/opt/envsubst < /envsubst_template.json > /conf/runtime.json
|
2021-06-23 11:43:00 +00:00
|
|
|
|
2021-06-24 15:12:31 +00:00
|
|
|
VERSION=$(date +%y%m%d%H%M%S)
|
|
|
|
|
2024-05-17 07:52:09 +00:00
|
|
|
if [ -z "$GIT_BRIDGE_JVM_ARGS" ]; then
|
2021-06-23 11:43:00 +00:00
|
|
|
GIT_BRIDGE_JVM_ARGS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=50.0"
|
|
|
|
fi
|
|
|
|
|
2024-05-17 07:52:09 +00:00
|
|
|
if [ "$ENABLE_PROFILE_AGENT" = "true" ]; then
|
2021-06-24 15:12:31 +00: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 13:58:25 +00:00
|
|
|
fi
|
|
|
|
|
2021-06-23 11:43:00 +00:00
|
|
|
exec java $GIT_BRIDGE_JVM_ARGS -jar /git-bridge.jar /conf/runtime.json
|