diff --git a/docker/init_scripts/init b/docker/init_scripts/init index d0a73b79c..671996fe4 100755 --- a/docker/init_scripts/init +++ b/docker/init_scripts/init @@ -8,6 +8,9 @@ shopt -s inherit_errexit # inherit errexit # use virtualenvs source /backend/bin/activate +# make it possible to disable the inotify watcher process +ENABLE_RESCAN_ON_FILESYSTEM_CHANGE="${ENABLE_RESCAN_ON_FILESYSTEM_CHANGE:="true"}" + # Set redis to false if not set by docker env ENABLE_EXPERIMENTAL_REDIS="${ENABLE_EXPERIMENTAL_REDIS:="false"}" @@ -112,8 +115,12 @@ while true; do # Start uvicorn if we dont have a corresponding PID file watchdog_process_pid bin uvicorn - # Start watcher if we dont have a corresponding PID file - watchdog_process_pid python watcher + # Start background worker processes when we have a REDIS configured + # ENABLE_EXPERIMENTAL_REDIS is defaulted to false, unless its set from our docker env + if [[ ${ENABLE_RESCAN_ON_FILESYSTEM_CHANGE} == "true" ]]; then + # Start watcher if we dont have a corresponding PID file + watchdog_process_pid python watcher + fi # Start background worker processes when we have a REDIS configured # ENABLE_EXPERIMENTAL_REDIS is defaulted to false, unless its set from our docker env