Upload start.sh with huggingface_hub
Browse files
start.sh
CHANGED
|
@@ -3,21 +3,13 @@ set -e
|
|
| 3 |
|
| 4 |
echo "=== Dev-Box + Krevetka VPS Startup ==="
|
| 5 |
|
| 6 |
-
# 1. Start KB HTTP server (port 8811)
|
| 7 |
echo "1/3: KB HTTP server (port 8811)"
|
| 8 |
cd /app
|
| 9 |
gunicorn -b 0.0.0.0:8811 -w 2 --timeout 30 kb_server:app &
|
| 10 |
KB_PID=$!
|
| 11 |
-
echo " KB server PID: $KB_PID"
|
| 12 |
sleep 2
|
| 13 |
|
| 14 |
-
# Verify KB server
|
| 15 |
-
if curl -sf http://127.0.0.1:8811/health > /dev/null 2>&1; then
|
| 16 |
-
echo " KB server: OK"
|
| 17 |
-
else
|
| 18 |
-
echo " KB server: WARNING — not responding yet"
|
| 19 |
-
fi
|
| 20 |
-
|
| 21 |
# 2. Generate picoclaw config from secrets
|
| 22 |
echo "2/3: Picoclaw config"
|
| 23 |
python3 /app/gen_config.py
|
|
@@ -25,19 +17,17 @@ python3 /app/gen_config.py
|
|
| 25 |
# 3. Start picoclaw gateway (if Discord token is set)
|
| 26 |
if [ -n "$DISCORD_TOKEN" ]; then
|
| 27 |
echo "3/3: Picoclaw gateway (Discord)"
|
| 28 |
-
cd /app
|
| 29 |
-
|
| 30 |
PICO_PID=$!
|
| 31 |
echo " Picoclaw PID: $PICO_PID"
|
| 32 |
else
|
| 33 |
echo "3/3: Picoclaw skipped (no DISCORD_TOKEN)"
|
| 34 |
-
PICO_PID=""
|
| 35 |
fi
|
| 36 |
|
| 37 |
-
# 4. Start code-server on port 7860
|
| 38 |
-
echo " Starting code-server
|
| 39 |
-
PASSWORD="${PASSWORD:-
|
| 40 |
-
exec code-server --bind-addr 0.0.0.0:7860 \
|
| 41 |
--auth password \
|
| 42 |
--disable-telemetry \
|
| 43 |
--disable-update-check \
|
|
|
|
| 3 |
|
| 4 |
echo "=== Dev-Box + Krevetka VPS Startup ==="
|
| 5 |
|
| 6 |
+
# 1. Start KB HTTP server (port 8811)
|
| 7 |
echo "1/3: KB HTTP server (port 8811)"
|
| 8 |
cd /app
|
| 9 |
gunicorn -b 0.0.0.0:8811 -w 2 --timeout 30 kb_server:app &
|
| 10 |
KB_PID=$!
|
|
|
|
| 11 |
sleep 2
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
# 2. Generate picoclaw config from secrets
|
| 14 |
echo "2/3: Picoclaw config"
|
| 15 |
python3 /app/gen_config.py
|
|
|
|
| 17 |
# 3. Start picoclaw gateway (if Discord token is set)
|
| 18 |
if [ -n "$DISCORD_TOKEN" ]; then
|
| 19 |
echo "3/3: Picoclaw gateway (Discord)"
|
| 20 |
+
cd /app
|
| 21 |
+
python3 /app/launch_picoclaw.py &
|
| 22 |
PICO_PID=$!
|
| 23 |
echo " Picoclaw PID: $PICO_PID"
|
| 24 |
else
|
| 25 |
echo "3/3: Picoclaw skipped (no DISCORD_TOKEN)"
|
|
|
|
| 26 |
fi
|
| 27 |
|
| 28 |
+
# 4. Start code-server on port 7860
|
| 29 |
+
echo " Starting code-server..."
|
| 30 |
+
PASSWORD="${PASSWORD:-changeme}" exec code-server --bind-addr 0.0.0.0:7860 \
|
|
|
|
| 31 |
--auth password \
|
| 32 |
--disable-telemetry \
|
| 33 |
--disable-update-check \
|