overleaf/services/git-bridge/start.sh
Gernot Schulz e8fe5abc82 Merge pull request #18312 from overleaf/gs-git-bridge-bash
Install bash in git-bridge Docker image

GitOrigin-RevId: 2ed599c3c2a3a1c3e66845d4d17d6ac36d925d70
2024-05-17 08:05:19 +00:00

15 lines
528 B
Bash
Executable file

#!/bin/sh
/opt/envsubst < /envsubst_template.json > /conf/runtime.json
VERSION=$(date +%y%m%d%H%M%S)
if [ -z "$GIT_BRIDGE_JVM_ARGS" ]; 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