From fd8cab42a80b28fa92afad2e630f5f7af3479a47 Mon Sep 17 00:00:00 2001 From: dek Date: Mon, 30 Oct 2023 09:39:49 +0100 Subject: [PATCH] add environment variables to docker entrypoint --- root/app.sh | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/root/app.sh b/root/app.sh index 8c987948..ca0ff7a8 100755 --- a/root/app.sh +++ b/root/app.sh @@ -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 @@ -26,4 +38,4 @@ cd /app echo "Starting" s6-setuidgid node \ - node index.js $ARGS "$@" \ No newline at end of file + node index.js $ARGS "$@"