mirror of
https://github.com/benbusby/whoogle-search.git
synced 2025-07-09 03:04:13 -04:00
Revert "Allow executing run script w/o prior setup"
This reverts commit 7f91de7399730c483f11d7f0e42e267f6b328001. Fixes #540
This commit is contained in:
parent
7f91de7399
commit
a768c1b5aa
15
run
15
run
@ -7,19 +7,6 @@ set -euo pipefail
|
||||
|
||||
SCRIPT_DIR="$(builtin cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
||||
|
||||
if [[ ! -x "$(command -v python3)" ]]; then
|
||||
echo "Python3 required -- please install first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -d "$SCRIPT_DIR/venv" ]]; then
|
||||
python3 -m venv venv
|
||||
"$SCRIPT_DIR"/venv/bin/pip install --upgrade pip
|
||||
"$SCRIPT_DIR"/venv/bin/pip install -r requirements.txt
|
||||
fi
|
||||
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
# Set directory to serve static content from
|
||||
SUBDIR="${1:-app}"
|
||||
export APP_ROOT="$SCRIPT_DIR/$SUBDIR"
|
||||
@ -37,7 +24,7 @@ if [[ "$SUBDIR" == "test" ]]; then
|
||||
pytest -sv
|
||||
else
|
||||
mkdir -p "$STATIC_FOLDER"
|
||||
"$SCRIPT_DIR"/venv/bin/python -um app \
|
||||
python3 -um app \
|
||||
--host "${ADDRESS:-0.0.0.0}" \
|
||||
--port "${PORT:-"${EXPOSE_PORT:-5000}"}"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user