Beta-2.1 - The clearer, the faster #22

Merged
Djeex merged 27 commits from Beta-2.1 into main 2025-09-04 12:50:26 +02:00
12 changed files with 199 additions and 21 deletions
Showing only changes of commit 5b65e5efe3 - Show all commits

View File

@ -5,12 +5,12 @@ CYAN="\033[1;36m"
NC="\033[0m" NC="\033[0m"
copy_default_config() { copy_default_config() {
echo "Checking configuration directory..." echo "[~] Checking configuration directory..."
if [ ! -d "/app/config" ]; then if [ ! -d "/app/config" ]; then
mkdir -p /app/config mkdir -p /app/config
fi fi
echo "Checking if default config files need to be copied..." echo "[~] Checking if default config files need to be copied..."
files_copied=false files_copied=false
for file in /app/default/*; do for file in /app/default/*; do
@ -18,16 +18,16 @@ copy_default_config() {
target="/app/config/$filename" target="/app/config/$filename"
if [ ! -e "$target" ]; then if [ ! -e "$target" ]; then
echo "Copying default config file: $filename" echo "[→] Copying default config file: $filename"
cp -r "$file" "$target" cp -r "$file" "$target"
files_copied=true files_copied=true
fi fi
done done
if [ "$files_copied" = true ]; then if [ "$files_copied" = true ]; then
echo "Default configuration files copied successfully." echo "[✓] Default configuration files copied successfully."
else else
echo "No default files needed to be copied." echo "[✓] No default files needed to be copied."
fi fi
} }
@ -44,12 +44,12 @@ start_server() {
cat /tmp/build_logs_fifo2 >&2 & cat /tmp/build_logs_fifo2 >&2 &
PREVIEW_PORT="${PREVIEW_PORT:-3000}" PREVIEW_PORT="${PREVIEW_PORT:-3000}"
echo "Starting preview HTTP server on port 3000..." echo "[~]Starting preview HTTP server on port 3000..."
echo "Preview host port is set to: ${PREVIEW_PORT}" echo "[i] Preview host port is set to: ${PREVIEW_PORT}"
python3 -u -m http.server 3000 -d /app/output & python3 -u -m http.server 3000 -d /app/output &
SERVER_PID=$! SERVER_PID=$!
echo "Starting Lumeex Flask webui..." echo "[~] Starting Lumeex Flask webui..."
python3 -u -m src.py.webui.webui & python3 -u -m src.py.webui.webui &
WEBUI_PID=$! WEBUI_PID=$!
@ -74,15 +74,15 @@ fi
case "$1" in case "$1" in
build) build)
echo "Running build.py..." echo "[~] Running build.py..."
python3 -u /app/build.py 2>&1 | tee /tmp/build_logs_fifo python3 -u /app/build.py 2>&1 | tee /tmp/build_logs_fifo
;; ;;
gallery) gallery)
echo "Running gallery.py..." echo "[~] Running gallery.py..."
python3 -u /app/gallery.py 2>&1 | tee /tmp/build_logs_fifo2 python3 -u /app/gallery.py 2>&1 | tee /tmp/build_logs_fifo2
;; ;;
*) *)
echo "Unknown command: $1" echo "[!] Unknown command: $1"
exec "$@" exec "$@"
;; ;;
esac esac

View File

@ -494,6 +494,6 @@ def download_output_zip():
# --- Run server --- # --- Run server ---
if __name__ == "__main__": if __name__ == "__main__":
logging.info("Starting WebUI at http://0.0.0.0:5000") logging.info("[~] Starting WebUI at http://0.0.0.0:5000")
logging.info(f"Host port is {WEBUI_PORT}") logging.info(f"[i] WebUI host port is set to {WEBUI_PORT}")
app.run(host="0.0.0.0", port=5000, debug=True) app.run(host="0.0.0.0", port=5000, debug=True)