Skip to content

Commit

Permalink
fix start as non root
Browse files Browse the repository at this point in the history
  • Loading branch information
NyakudyaA committed Aug 31, 2023
1 parent 1818afe commit 51621d0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions scripts/setup-replication.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,10 @@ source /scripts/env-data.sh
# Adapted from https://github.com/DanielDent/docker-postgres-replication
# To set up replication
if [[ ${RUN_AS_ROOT} =~ [Ff][Aa][Ll][Ss][Ee] ]];then
echo "gosu ${USER_NAME}:${DB_GROUP_NAME} bash -c" > /tmp/gosu_subs.txt
envsubst < /tmp/gosu_subs.txt > /tmp/gosu_command.txt
GOSU_COMMAND=$(cat /tmp/gosu_command.txt)
function START_COMMAND() {
PARAM=$1
${GOSU_COMMAND} "$1"
gosu ${USER_NAME} bash -c "$1"
}
rm /tmp/gosu_subs.txt /tmp/gosu_command.txt
else
function START_COMMAND() {
PARAM=$1
Expand Down

0 comments on commit 51621d0

Please sign in to comment.