overleaf/services/git-bridge/start.sh
Christopher Hoskin 9278788bee Merge pull request #18028 from overleaf/csh-issue-18027-git-bridge-image
Run git-bridge on an image which is supported going forward

GitOrigin-RevId: be4d9ad5b8c11f206a9c5519fc016075c3114aff
2024-04-23 08:04:24 +00:00

15 lines
534 B
Bash
Executable file

#!/bin/sh
/opt/envsubst < /envsubst_template.json > /conf/runtime.json
VERSION=$(date +%y%m%d%H%M%S)
if [ "x$GIT_BRIDGE_JVM_ARGS" == "x" ]; then
GIT_BRIDGE_JVM_ARGS="-XX:+UseContainerSupport -XX:MaxRAMPercentage=50.0"
fi
if [ "$ENABLE_PROFILE_AGENT" == "true" ]; then
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}"
fi
exec java $GIT_BRIDGE_JVM_ARGS -jar /git-bridge.jar /conf/runtime.json