#!/bin/sh # Wait for wizard config before starting uvicorn CONFIG_DIR="${CONFIG_DIR:-/config}" CONFIG_FILE="${CONFIG_FILE:-harborforge.json}" CONFIG_PATH="$CONFIG_DIR/$CONFIG_FILE" echo "HarborForge Backend - waiting for config..." echo " Config path: $CONFIG_PATH" while true; do if [ -f "$CONFIG_PATH" ]; then echo " Config found! Starting backend..." break fi echo " Config not ready, waiting 5s... (run setup wizard via SSH tunnel)" sleep 5 done exec uvicorn app.main:app --host 0.0.0.0 --port 8000