@atolis-hq/wake 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -337,13 +337,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \\
|
|
|
337
337
|
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \\
|
|
338
338
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \\
|
|
339
339
|
> /etc/apt/sources.list.d/github-cli.list \\
|
|
340
|
-
&& curl -fsSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc \\
|
|
341
|
-
| gpg --dearmor -o /etc/apt/keyrings/ngrok-archive-keyring.gpg \\
|
|
342
|
-
&& chmod go+r /etc/apt/keyrings/ngrok-archive-keyring.gpg \\
|
|
343
|
-
&& echo "deb [signed-by=/etc/apt/keyrings/ngrok-archive-keyring.gpg] https://ngrok-agent.s3.amazonaws.com buster main" \\
|
|
344
|
-
> /etc/apt/sources.list.d/ngrok.list \\
|
|
345
340
|
&& apt-get update \\
|
|
346
|
-
&& apt-get install -y --no-install-recommends gh
|
|
341
|
+
&& apt-get install -y --no-install-recommends gh
|
|
347
342
|
|
|
348
343
|
RUN --mount=type=cache,target=/root/.npm \\
|
|
349
344
|
npm install -g @anthropic-ai/claude-code @openai/codex
|
|
@@ -427,13 +422,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \\
|
|
|
427
422
|
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \\
|
|
428
423
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \\
|
|
429
424
|
> /etc/apt/sources.list.d/github-cli.list \\
|
|
430
|
-
&& curl -fsSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc \\
|
|
431
|
-
| gpg --dearmor -o /etc/apt/keyrings/ngrok-archive-keyring.gpg \\
|
|
432
|
-
&& chmod go+r /etc/apt/keyrings/ngrok-archive-keyring.gpg \\
|
|
433
|
-
&& echo "deb [signed-by=/etc/apt/keyrings/ngrok-archive-keyring.gpg] https://ngrok-agent.s3.amazonaws.com buster main" \\
|
|
434
|
-
> /etc/apt/sources.list.d/ngrok.list \\
|
|
435
425
|
&& apt-get update \\
|
|
436
|
-
&& apt-get install -y --no-install-recommends gh
|
|
426
|
+
&& apt-get install -y --no-install-recommends gh
|
|
437
427
|
|
|
438
428
|
ARG WAKE_VERSION=0.1.0
|
|
439
429
|
RUN --mount=type=cache,target=/root/.npm \\
|
package/docker/Dockerfile
CHANGED
|
@@ -11,13 +11,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
|
11
11
|
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
|
|
12
12
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
|
|
13
13
|
> /etc/apt/sources.list.d/github-cli.list \
|
|
14
|
-
&& curl -fsSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc \
|
|
15
|
-
| gpg --dearmor -o /etc/apt/keyrings/ngrok-archive-keyring.gpg \
|
|
16
|
-
&& chmod go+r /etc/apt/keyrings/ngrok-archive-keyring.gpg \
|
|
17
|
-
&& echo "deb [signed-by=/etc/apt/keyrings/ngrok-archive-keyring.gpg] https://ngrok-agent.s3.amazonaws.com buster main" \
|
|
18
|
-
> /etc/apt/sources.list.d/ngrok.list \
|
|
19
14
|
&& apt-get update \
|
|
20
|
-
&& apt-get install -y --no-install-recommends gh
|
|
15
|
+
&& apt-get install -y --no-install-recommends gh
|
|
21
16
|
|
|
22
17
|
RUN --mount=type=cache,target=/root/.npm \
|
|
23
18
|
npm install -g @anthropic-ai/claude-code @openai/codex
|
|
@@ -11,13 +11,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
|
|
11
11
|
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
|
|
12
12
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
|
|
13
13
|
> /etc/apt/sources.list.d/github-cli.list \
|
|
14
|
-
&& curl -fsSL https://ngrok-agent.s3.amazonaws.com/ngrok.asc \
|
|
15
|
-
| gpg --dearmor -o /etc/apt/keyrings/ngrok-archive-keyring.gpg \
|
|
16
|
-
&& chmod go+r /etc/apt/keyrings/ngrok-archive-keyring.gpg \
|
|
17
|
-
&& echo "deb [signed-by=/etc/apt/keyrings/ngrok-archive-keyring.gpg] https://ngrok-agent.s3.amazonaws.com buster main" \
|
|
18
|
-
> /etc/apt/sources.list.d/ngrok.list \
|
|
19
14
|
&& apt-get update \
|
|
20
|
-
&& apt-get install -y --no-install-recommends gh
|
|
15
|
+
&& apt-get install -y --no-install-recommends gh
|
|
21
16
|
|
|
22
17
|
ARG WAKE_VERSION
|
|
23
18
|
RUN test -n "$WAKE_VERSION" || (echo "WAKE_VERSION build arg is required" && exit 1)
|
package/package.json
CHANGED
package/docker/entrypoint.sh
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
set -uo pipefail
|
|
3
|
-
|
|
4
|
-
mkdir -p /wake/logs
|
|
5
|
-
|
|
6
|
-
write_ngrok_public_url() {
|
|
7
|
-
local output_file="/wake/control-plane-ui-url"
|
|
8
|
-
|
|
9
|
-
rm -f "${output_file}"
|
|
10
|
-
for _ in $(seq 1 30); do
|
|
11
|
-
local public_url
|
|
12
|
-
public_url="$(
|
|
13
|
-
node -e '
|
|
14
|
-
const http = require("node:http");
|
|
15
|
-
const req = http.get("http://127.0.0.1:4040/api/tunnels", (res) => {
|
|
16
|
-
let body = "";
|
|
17
|
-
res.setEncoding("utf8");
|
|
18
|
-
res.on("data", (chunk) => { body += chunk; });
|
|
19
|
-
res.on("end", () => {
|
|
20
|
-
try {
|
|
21
|
-
const tunnels = JSON.parse(body).tunnels ?? [];
|
|
22
|
-
const tunnel = tunnels.find((entry) => typeof entry.public_url === "string" && entry.public_url.startsWith("https://"))
|
|
23
|
-
?? tunnels.find((entry) => typeof entry.public_url === "string");
|
|
24
|
-
if (tunnel !== undefined) {
|
|
25
|
-
process.stdout.write(tunnel.public_url);
|
|
26
|
-
}
|
|
27
|
-
} catch {}
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
req.on("error", () => {});
|
|
31
|
-
req.setTimeout(1000, () => req.destroy());
|
|
32
|
-
' || true
|
|
33
|
-
)"
|
|
34
|
-
|
|
35
|
-
if [ -n "${public_url}" ]; then
|
|
36
|
-
printf '%s\n' "${public_url}" > "${output_file}"
|
|
37
|
-
echo "wake ui: ngrok tunnel available at ${public_url}"
|
|
38
|
-
return 0
|
|
39
|
-
fi
|
|
40
|
-
|
|
41
|
-
sleep 1
|
|
42
|
-
done
|
|
43
|
-
|
|
44
|
-
echo "wake ui: ngrok tunnel started but public URL was not discovered; see /wake/logs/ngrok.log"
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
supervise_wake_start() {
|
|
48
|
-
local restart_delay="${WAKE_START_RESTART_DELAY_SECONDS:-10}"
|
|
49
|
-
|
|
50
|
-
while true; do
|
|
51
|
-
echo "wake start: starting resident loop"
|
|
52
|
-
node /app/dist/src/main.js start \
|
|
53
|
-
--wake-root /wake \
|
|
54
|
-
>> /wake/logs/start.log 2>&1 &
|
|
55
|
-
|
|
56
|
-
local child_pid="$!"
|
|
57
|
-
echo "${child_pid}" > /wake/logs/start.pid
|
|
58
|
-
|
|
59
|
-
wait "${child_pid}"
|
|
60
|
-
local exit_code="$?"
|
|
61
|
-
echo "wake start: resident loop exited with status ${exit_code}; restarting in ${restart_delay}s"
|
|
62
|
-
sleep "${restart_delay}"
|
|
63
|
-
done
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if [ "${WAKE_UI_ENABLED:-false}" = "true" ]; then
|
|
67
|
-
echo "wake ui: starting on 0.0.0.0:${WAKE_UI_PORT:-4317}"
|
|
68
|
-
node /app/dist/src/main.js ui \
|
|
69
|
-
--wake-root /wake \
|
|
70
|
-
--host 0.0.0.0 \
|
|
71
|
-
--port "${WAKE_UI_PORT:-4317}" \
|
|
72
|
-
${WAKE_UI_TOKEN:+--token "${WAKE_UI_TOKEN}"} \
|
|
73
|
-
>> /wake/logs/ui.log 2>&1 &
|
|
74
|
-
|
|
75
|
-
if [ "${WAKE_UI_TUNNEL_ENABLED:-false}" = "true" ]; then
|
|
76
|
-
if [ -n "${NGROK_AUTHTOKEN:-}" ]; then
|
|
77
|
-
ngrok config add-authtoken "${NGROK_AUTHTOKEN}" >> /wake/logs/ngrok.log 2>&1
|
|
78
|
-
fi
|
|
79
|
-
|
|
80
|
-
echo "wake ui: starting ngrok tunnel for 127.0.0.1:${WAKE_UI_PORT:-4317}"
|
|
81
|
-
ngrok http "127.0.0.1:${WAKE_UI_PORT:-4317}" --log=stdout >> /wake/logs/ngrok.log 2>&1 &
|
|
82
|
-
write_ngrok_public_url &
|
|
83
|
-
fi
|
|
84
|
-
fi
|
|
85
|
-
|
|
86
|
-
if [ "${WAKE_START_ENABLED:-false}" = "true" ]; then
|
|
87
|
-
supervise_wake_start &
|
|
88
|
-
fi
|
|
89
|
-
|
|
90
|
-
exec sleep infinity
|