feat: add a docker environment var for continuous watching

This commit is contained in:
Jun Kurihara 2023-07-25 16:52:17 +09:00
commit 5ff285c3ec
No known key found for this signature in database
GPG key ID: D992B3E3DE1DED23
4 changed files with 22 additions and 2 deletions

View file

@ -7,4 +7,19 @@ if [ -z $LOG_LEVEL ]; then
fi
echo "rpxy: Logging with level ${LOG_LEVEL}"
RUST_LOG=${LOG_LEVEL} /rpxy/bin/rpxy --config ${CONFIG_FILE}
# continuously watch and reload the config file
if [ -z $WATCH ]; then
WATCH=false
else
if [ "$WATCH" = "true" ]; then
WATCH=true
else
WATCH=false
fi
fi
if $WATCH ; then
RUST_LOG=${LOG_LEVEL} /rpxy/bin/rpxy --config ${CONFIG_FILE} -w
else
RUST_LOG=${LOG_LEVEL} /rpxy/bin/rpxy --config ${CONFIG_FILE}
fi