Spaces:
Running
Running
Replace Codeman with Ekko Studio Web UI at root (port 7861)
Browse files- Dockerfile +1 -1
- config/Caddyfile.example +2 -2
- services/25-codeman.sh +0 -43
- services/25-ekko-studio.sh +43 -0
Dockerfile
CHANGED
|
@@ -194,7 +194,7 @@ RUN curl -fsSL "https://github.com/oven-sh/bun/releases/latest/download/bun-linu
|
|
| 194 |
# ------------------------------------------
|
| 195 |
COPY security/stub-playwright-index.js /tmp/stub-pw.js
|
| 196 |
COPY security/stub-playwright-index.mjs /tmp/stub-pw.mjs
|
| 197 |
-
RUN npm install -g supergateway@4.1.0 rea-agents@latest opencode-ai @deepseek-ai/dsh
|
| 198 |
chmod +x /usr/local/bin/* 2>/dev/null || true && \
|
| 199 |
cp /tmp/stub-pw.js /usr/local/lib/node_modules/rea-agents/node_modules/playwright-core/index.js 2>/dev/null || true && \
|
| 200 |
cp /tmp/stub-pw.mjs /usr/local/lib/node_modules/rea-agents/node_modules/playwright-core/index.mjs 2>/dev/null || true && \
|
|
|
|
| 194 |
# ------------------------------------------
|
| 195 |
COPY security/stub-playwright-index.js /tmp/stub-pw.js
|
| 196 |
COPY security/stub-playwright-index.mjs /tmp/stub-pw.mjs
|
| 197 |
+
RUN npm install -g supergateway@4.1.0 rea-agents@latest opencode-ai @deepseek-ai/dsh hermes-web-ui@0.7.34 pnpm yarn typescript --prefix /usr/local && \
|
| 198 |
chmod +x /usr/local/bin/* 2>/dev/null || true && \
|
| 199 |
cp /tmp/stub-pw.js /usr/local/lib/node_modules/rea-agents/node_modules/playwright-core/index.js 2>/dev/null || true && \
|
| 200 |
cp /tmp/stub-pw.mjs /usr/local/lib/node_modules/rea-agents/node_modules/playwright-core/index.mjs 2>/dev/null || true && \
|
config/Caddyfile.example
CHANGED
|
@@ -64,8 +64,8 @@
|
|
| 64 |
file_server
|
| 65 |
}
|
| 66 |
|
| 67 |
-
# 6.
|
| 68 |
handle {
|
| 69 |
-
reverse_proxy 127.0.0.1:
|
| 70 |
}
|
| 71 |
}
|
|
|
|
| 64 |
file_server
|
| 65 |
}
|
| 66 |
|
| 67 |
+
# 6. Ekko Studio Web UI fallback at root
|
| 68 |
handle {
|
| 69 |
+
reverse_proxy 127.0.0.1:7861
|
| 70 |
}
|
| 71 |
}
|
services/25-codeman.sh
DELETED
|
@@ -1,43 +0,0 @@
|
|
| 1 |
-
#!/bin/bash
|
| 2 |
-
# 25-codeman.sh — Codeman Mission Control UI on 127.0.0.1:3000
|
| 3 |
-
DIR="/data/script/codeman"
|
| 4 |
-
mkdir -p "$DIR" /tmp/logs /tmp/.cache
|
| 5 |
-
LOG="/tmp/logs/codeman.log"
|
| 6 |
-
|
| 7 |
-
if [ -f /tmp/.env ]; then
|
| 8 |
-
set -a
|
| 9 |
-
. /tmp/.env
|
| 10 |
-
set +a
|
| 11 |
-
fi
|
| 12 |
-
if [ -f /data/.env ]; then
|
| 13 |
-
set -a
|
| 14 |
-
. /data/.env
|
| 15 |
-
set +a
|
| 16 |
-
fi
|
| 17 |
-
|
| 18 |
-
export PORT=3000
|
| 19 |
-
export HOST="0.0.0.0"
|
| 20 |
-
export CODEMAN_DATA_DIR="/data/workspace"
|
| 21 |
-
export CODEMAN_ALLOWED_HOSTS=".hf.space,amangs-cbot.hf.space,amangs-cbotx.hf.space,localhost,127.0.0.1"
|
| 22 |
-
|
| 23 |
-
# Password auth
|
| 24 |
-
PASS="${CODEMAN_PASSWORD:-${AUTH_TOKEN:-}}"
|
| 25 |
-
if [ -n "$PASS" ]; then
|
| 26 |
-
export CODEMAN_AUTH_PASSWORD="$PASS"
|
| 27 |
-
fi
|
| 28 |
-
|
| 29 |
-
if pgrep -f "codeman.*3000" >/dev/null 2>&1; then
|
| 30 |
-
echo "codeman already running"
|
| 31 |
-
exit 0
|
| 32 |
-
fi
|
| 33 |
-
|
| 34 |
-
cd /data/workspace || exit 1
|
| 35 |
-
CMD="/usr/local/bin/codeman"
|
| 36 |
-
if [ ! -x "$CMD" ]; then
|
| 37 |
-
CMD="$(command -v codeman || which codeman 2>/dev/null)"
|
| 38 |
-
fi
|
| 39 |
-
if [ -z "$CMD" ] || [ ! -x "$CMD" ]; then
|
| 40 |
-
CMD="npx -y aicodeman@latest"
|
| 41 |
-
fi
|
| 42 |
-
|
| 43 |
-
exec $CMD --port 3000 --host 127.0.0.1 >> "$LOG" 2>&1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
services/25-ekko-studio.sh
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# 25-ekko-studio.sh — Ekko Studio Web UI on internal port 7861
|
| 3 |
+
DIR="/data/script/ekko-studio"
|
| 4 |
+
mkdir -p "$DIR" /tmp/logs /tmp/.cache /data/.ekko-studio
|
| 5 |
+
LOG="/tmp/logs/ekko-studio.log"
|
| 6 |
+
|
| 7 |
+
if [ -f /tmp/.env ]; then
|
| 8 |
+
set -a
|
| 9 |
+
. /tmp/.env
|
| 10 |
+
set +a
|
| 11 |
+
fi
|
| 12 |
+
if [ -f /data/.env ]; then
|
| 13 |
+
set -a
|
| 14 |
+
. /data/.env
|
| 15 |
+
set +a
|
| 16 |
+
fi
|
| 17 |
+
|
| 18 |
+
export PORT=7861
|
| 19 |
+
export HOST="0.0.0.0"
|
| 20 |
+
export HERMES_WEB_UI_HOME="/data/.ekko-studio"
|
| 21 |
+
export HERMES_HOME="/data/workspace"
|
| 22 |
+
export AUTH_TOKEN="${AUTH_TOKEN:-${CODE_PASSWORD:-123456}}"
|
| 23 |
+
export PASSWORD="$AUTH_TOKEN"
|
| 24 |
+
export TMPDIR="/tmp"
|
| 25 |
+
|
| 26 |
+
if pgrep -f "hermes-web-ui.*7861" >/dev/null 2>&1; then
|
| 27 |
+
echo "ekko-studio already running"
|
| 28 |
+
exit 0
|
| 29 |
+
fi
|
| 30 |
+
|
| 31 |
+
cd /data/workspace || exit 1
|
| 32 |
+
|
| 33 |
+
# Launch Ekko Studio (packaged as hermes-web-ui)
|
| 34 |
+
ENTRY="/opt/hermes-web-ui/dist/server/index.js"
|
| 35 |
+
if [ ! -f "$ENTRY" ]; then
|
| 36 |
+
ENTRY="$(find / -name "index.js" 2>/dev/null | grep "hermes-web-ui/dist/server/index.js" | head -1)"
|
| 37 |
+
fi
|
| 38 |
+
|
| 39 |
+
if [ -n "$ENTRY" ] && [ -f "$ENTRY" ]; then
|
| 40 |
+
exec node "$ENTRY" >> "$LOG" 2>&1
|
| 41 |
+
else
|
| 42 |
+
exec npx -y hermes-web-ui@0.7.34 >> "$LOG" 2>&1
|
| 43 |
+
fi
|