feat: configurable port, use HUB_DATA and HUB_PORT env vars
This commit is contained in:
1 parent
6be745a6f4
commit
248146056a
5 files changed
+16
-12
No files matched your search
@@ -11,11 +11,11 @@ else
|
||||
echo "Write a .env file with the variables: REPLICATE_API_TOKEN"
|
||||
fi
|
||||
|
||||
export HORDE_DATA_DIR=$(realpath ./local-data)
|
||||
export HUB_DATA=$(realpath ./local-data)
|
||||
|
||||
case "$1" in
|
||||
"")
|
||||
mkdir -p $HORDE_DATA_DIR
|
||||
mkdir -p $HUB_DATA
|
||||
python backend/src/app.py
|
||||
;;
|
||||
"cli")
|
||||
@@ -23,9 +23,9 @@ case "$1" in
|
||||
node cli/main.js "$2"
|
||||
;;
|
||||
"test")
|
||||
export HORDE_DATA_DIR=$(realpath ./test-data)
|
||||
mkdir -p $HORDE_DATA_DIR
|
||||
rm -rf $HORDE_DATA_DIR/*
|
||||
export HUB_DATA=$(realpath ./test-data)
|
||||
mkdir -p $HUB_DATA
|
||||
rm -rf $HUB_DATA/*
|
||||
|
||||
# Start backend in the background
|
||||
python backend/src/app.py &
|
||||
@@ -63,7 +63,7 @@ case "$1" in
|
||||
# Execute with custom home directory if it exists
|
||||
*)
|
||||
if [ -d "$1" ]; then
|
||||
export HORDE_DATA_DIR=$(realpath $1)
|
||||
export HUB_DATA=$(realpath $1)
|
||||
python backend/src/app.py
|
||||
else
|
||||
echo "Error: unknown command or directory '$1'"
|
||||
|
||||
Reference in new issue
Block a user