diff --git a/Dockerfile b/Dockerfile index d65cb8c..57eb0e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,4 +6,4 @@ RUN npm install --production --silent && mv node_modules ../ COPY . . RUN chown -R node /usr/src/app USER node -ENTRYPOINT ["/bin/sh" , "-c" , "scooper-bot.sh", "-t ${TOKEN} -u ${USER_ID} -S ${SALT}"] +ENTRYPOINT ["/bin/sh", "-c", "./entrypoint.sh", "-t ${TOKEN} -u ${USER_ID} -S ${SALT}"] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..2bba09e --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +#export TELEGRAM_TOKEN=nope +#export TELEGRAM_USER_ID=nope +#export IFF_SUBMISSION_SALT=nope + +while getopts t:u:S: flag +do + case "${flag}" in + t) TELEGRAM_TOKEN=${OPTARG};; + u) TELEGRAM_USER_ID=${OPTARG};; + S) IFF_SUBMISSION_SALT=${OPTARG};; + esac +done + +echo "TOKEN: $TELEGRAM_TOKEN" +echo "USER ID: $TELEGRAM_USER_ID" +echo "SALT: $IFF_SUBMISSION_SALT" + +npm start