Skip to content

Commit

Permalink
add environment variables to docker entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
dekonnection committed Oct 30, 2023
1 parent 04cbe99 commit fd8cab4
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions root/app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,30 @@ if [ ! -z "$IP" ]; then
ARGS="${ARGS} -ip ${IP}"
fi

if [ ! -z "$LABEL" ]; then
ARGS="${ARGS} -l ${LABEL}"
fi

if [ ! -z "$NAME" ]; then
ARGS="${ARGS} -n ${NAME}"
fi

if [ ! -z "$PATTERN" ]; then
ARGS="${ARGS} -p ${PATTERN}"
if [ ! -z "$DIR" ]; then
ARGS="${ARGS} -d ${DIR}"
fi

if [ ! -z "$TEMP_DIR" ]; then
ARGS="${ARGS} -t ${TEMP_DIR}"
fi

if [ ! -z "$PATTERN" ]; then
ARGS="${ARGS} -p ${PATTERN}"
fi

if [ ! -z "$RESOLUTION" ]; then
ARGS="${ARGS} -r ${RESOLUTION}"
fi

if [ ! -z "$CMDLINE" ]; then
ARGS="${ARGS} ${CMDLINE}"
fi
Expand All @@ -26,4 +38,4 @@ cd /app

echo "Starting"
s6-setuidgid node \
node index.js $ARGS "$@"
node index.js $ARGS "$@"

0 comments on commit fd8cab4

Please sign in to comment.