mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
Merge pull request #12371 from overleaf/em-git-bridge-data-directory
Server Pro entrypoint for git bridge GitOrigin-RevId: 278e3fa912fe015ef131d2c3f6673d154a1cdfb7
This commit is contained in:
parent
8ee8f2ded3
commit
ea7d633117
3 changed files with 14 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
*
|
||||
!start.sh
|
||||
!server-pro-start.sh
|
||||
!/conf
|
||||
!/lib
|
||||
!/src/main
|
||||
|
|
|
@ -49,6 +49,7 @@ RUN chmod +x /opt/envsubst
|
|||
|
||||
COPY conf/envsubst_template.json envsubst_template.json
|
||||
COPY start.sh start.sh
|
||||
COPY server-pro-start.sh server-pro-start.sh
|
||||
|
||||
RUN mkdir conf
|
||||
RUN chown node:node conf
|
||||
|
|
12
services/git-bridge/server-pro-start.sh
Executable file
12
services/git-bridge/server-pro-start.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
# This script is meant to be run as root when the git bridge starts up in
|
||||
# Server Pro. 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 /start.sh
|
Loading…
Reference in a new issue