Merge pull request #30510 from overleaf/mj-git-bridge-persistent-swap-local
[git-bridge] Make git-bridge data persistent GitOrigin-RevId: e5e7ec613db455b21b4f96c9bf8e6829cc02a4ce
This commit is contained in:
committed by
Copybot
parent
bf662f74f5
commit
750ef6ca19
@@ -1,6 +1,7 @@
|
||||
*
|
||||
!start.sh
|
||||
!server-pro-start.sh
|
||||
!dev-env-start.sh
|
||||
!/conf
|
||||
!/lib
|
||||
!/src/main
|
||||
|
||||
@@ -20,7 +20,7 @@ runtime-conf:
|
||||
|
||||
|
||||
run: $(MVN_TARGET) runtime-conf
|
||||
java $(GIT_BRIDGE_JVM_ARGS) -jar $(MVN_TARGET) conf/runtime.json
|
||||
@exec java $(GIT_BRIDGE_JVM_ARGS) -jar $(MVN_TARGET) conf/runtime.json
|
||||
|
||||
|
||||
$(MVN_TARGET): $(shell find src -type f) pom.xml
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
# This script is meant to be run as root when the git bridge starts up in
|
||||
# the dev environment. It ensures that the data directory is created and
|
||||
# owned by the "node" user, which is the regular user git bridge runs as.
|
||||
|
||||
ROOT_DIR="${GIT_BRIDGE_ROOT_DIR:-/tmp/wlgb}"
|
||||
mkdir -p "$ROOT_DIR"
|
||||
chown node:node "$ROOT_DIR"
|
||||
|
||||
# Drop privileges using setpriv to avoid spawning a new process
|
||||
exec setpriv --reuid=node --regid=node --init-groups make run
|
||||
Reference in New Issue
Block a user