mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 03:47:26 +00:00
fix(docker): support .mjs entrypoints in images and e2e
This commit is contained in:
@@ -31,7 +31,7 @@ echo "Starting gateway container..."
|
||||
-e "OPENCLAW_SKIP_CRON=1" \
|
||||
-e "OPENCLAW_SKIP_CANVAS_HOST=1" \
|
||||
"$IMAGE_NAME" \
|
||||
bash -lc "node dist/index.js gateway --port $PORT --bind lan --allow-unconfigured > /tmp/gateway-net-e2e.log 2>&1"
|
||||
bash -lc "entry=dist/index.mjs; [ -f \"\$entry\" ] || entry=dist/index.js; node \"\$entry\" gateway --port $PORT --bind lan --allow-unconfigured > /tmp/gateway-net-e2e.log 2>&1"
|
||||
|
||||
echo "Waiting for gateway to come up..."
|
||||
ready=0
|
||||
@@ -77,9 +77,9 @@ docker run --rm \
|
||||
-e "GW_URL=ws://$GW_NAME:$PORT" \
|
||||
-e "GW_TOKEN=$TOKEN" \
|
||||
"$IMAGE_NAME" \
|
||||
bash -lc "node - <<'NODE'
|
||||
bash -lc "node --import tsx - <<'NODE'
|
||||
import { WebSocket } from \"ws\";
|
||||
import { PROTOCOL_VERSION } from \"./dist/gateway/protocol/index.js\";
|
||||
import { PROTOCOL_VERSION } from \"./src/gateway/protocol/index.ts\";
|
||||
|
||||
const url = process.env.GW_URL;
|
||||
const token = process.env.GW_TOKEN;
|
||||
|
||||
Reference in New Issue
Block a user