Add Doris Kitchen household recipe app
This commit is contained in:
23
home/doris-kitchen/bin/check-env.sh
Normal file
23
home/doris-kitchen/bin/check-env.sh
Normal file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
have() { command -v "$1" >/dev/null 2>&1; }
|
||||
|
||||
printf 'Doris Kitchen environment check\n'
|
||||
printf '==============================\n'
|
||||
|
||||
for cmd in python3 docker curl; do
|
||||
if have "$cmd"; then
|
||||
printf '%-10s %s\n' "$cmd" "$(command -v "$cmd")"
|
||||
else
|
||||
printf '%-10s %s\n' "$cmd" "MISSING"
|
||||
fi
|
||||
done
|
||||
|
||||
python3 - <<'PY'
|
||||
import importlib.util
|
||||
mods = ['fastapi', 'uvicorn', 'jinja2']
|
||||
for mod in mods:
|
||||
print(f'{mod:10} ', 'installed' if importlib.util.find_spec(mod) else 'MISSING')
|
||||
PY
|
||||
|
||||
7
home/doris-kitchen/bin/run-local.sh
Normal file
7
home/doris-kitchen/bin/run-local.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
export DORIS_KITCHEN_STATE_DIR="${DORIS_KITCHEN_STATE_DIR:-/tmp/doris-kitchen-state}"
|
||||
uvicorn app.main:app --host 0.0.0.0 --port "${DORIS_KITCHEN_PORT:-8092}" --reload
|
||||
|
||||
Reference in New Issue
Block a user