feat: wizard config volume integration
- entrypoint.sh: wait for config file before starting uvicorn - config.py: resolve DB URL from wizard config volume - init_wizard.py: read config from file instead of HTTP - Dockerfile: use entrypoint.sh
This commit is contained in:
19
entrypoint.sh
Normal file
19
entrypoint.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user