chore: post-commit formatting churn
This commit is contained in:
+6
-6
@@ -6,18 +6,18 @@ REMOTE="${1:-alarm}"
|
||||
REMOTE_DIR="${2:-/zdata/root/dockerFiles/lvmh}"
|
||||
|
||||
if ! ssh "$REMOTE" "test -f $REMOTE_DIR/.env" 2>/dev/null; then
|
||||
echo "ERROR: $REMOTE:$REMOTE_DIR/.env missing. Create it first (see .env.example):"
|
||||
echo " ssh $REMOTE 'mkdir -p $REMOTE_DIR && cat > $REMOTE_DIR/.env' <<EOF
|
||||
echo "ERROR: $REMOTE:$REMOTE_DIR/.env missing. Create it first (see .env.example):"
|
||||
echo " ssh $REMOTE 'mkdir -p $REMOTE_DIR && cat > $REMOTE_DIR/.env' <<EOF
|
||||
LVMH_TOKEN=...
|
||||
ZAI_RENAUD_API_KEY=...
|
||||
EOF"
|
||||
exit 1
|
||||
exit 1
|
||||
fi
|
||||
|
||||
rsync -az --delete \
|
||||
--exclude .git --exclude node_modules --exclude web/dist \
|
||||
--exclude .env --exclude .scratch --exclude .pi \
|
||||
./ "$REMOTE:$REMOTE_DIR/"
|
||||
--exclude .git --exclude node_modules --exclude web/dist \
|
||||
--exclude .env --exclude .scratch --exclude .pi \
|
||||
./ "$REMOTE:$REMOTE_DIR/"
|
||||
|
||||
ssh "$REMOTE" "cd $REMOTE_DIR && docker compose build lvmh && docker compose up -d && docker compose ps"
|
||||
echo "Deployed: http://$REMOTE:8686"
|
||||
|
||||
+4
-2
@@ -9,10 +9,12 @@ BASE="http://$HOST:8686"
|
||||
auth=(-H "Authorization: Bearer $TOKEN")
|
||||
|
||||
echo "== sessions =="
|
||||
curl -fsS "${auth[@]}" "$BASE/api/sessions" | head -c 400; echo
|
||||
curl -fsS "${auth[@]}" "$BASE/api/sessions" | head -c 400
|
||||
echo
|
||||
|
||||
echo "== gitlab status =="
|
||||
curl -fsS "${auth[@]}" "$BASE/api/gitlab/status"; echo
|
||||
curl -fsS "${auth[@]}" "$BASE/api/gitlab/status"
|
||||
echo
|
||||
|
||||
echo "== web dist =="
|
||||
curl -fsS "$BASE/" | grep -o '<title>[^<]*</title>' || echo "no title tag"
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ services:
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- lvmh-data:/data
|
||||
- .:/app/build:ro # repo checkout (rsynced by deploy.sh)
|
||||
- .:/app/build:ro # repo checkout (rsynced by deploy.sh)
|
||||
# daemon rebuilds lvmh-worker from /app/build/docker/worker.Dockerfile
|
||||
networks:
|
||||
lvmh-net:
|
||||
|
||||
+19
-19
@@ -4,29 +4,29 @@
|
||||
import { createAgentSession } from "@earendil-works/pi-coding-agent";
|
||||
|
||||
process.on("unhandledRejection", (err) => {
|
||||
console.error("[lvmh-bridge] unhandledRejection:", err);
|
||||
console.error("[lvmh-bridge] unhandledRejection:", err);
|
||||
});
|
||||
|
||||
try {
|
||||
const { session } = await createAgentSession();
|
||||
console.error(`[lvmh-bridge] session up, cwd=${process.cwd()}`);
|
||||
const { session } = await createAgentSession();
|
||||
console.error(`[lvmh-bridge] session up, cwd=${process.cwd()}`);
|
||||
|
||||
session.subscribe((event) => {
|
||||
// Keep the loop warm; the extension does the mirroring.
|
||||
if (event.type === "agent_settled") {
|
||||
console.error("[lvmh-bridge] agent settled");
|
||||
}
|
||||
});
|
||||
session.subscribe((event) => {
|
||||
// Keep the loop warm; the extension does the mirroring.
|
||||
if (event.type === "agent_settled") {
|
||||
console.error("[lvmh-bridge] agent settled");
|
||||
}
|
||||
});
|
||||
|
||||
for (const sig of ["SIGTERM", "SIGINT"]) {
|
||||
process.on(sig, () => {
|
||||
console.error(`[lvmh-bridge] ${sig}, exiting`);
|
||||
process.exit(0);
|
||||
});
|
||||
}
|
||||
// Stay alive forever.
|
||||
setInterval(() => {}, 1 << 30);
|
||||
for (const sig of ["SIGTERM", "SIGINT"]) {
|
||||
process.on(sig, () => {
|
||||
console.error(`[lvmh-bridge] ${sig}, exiting`);
|
||||
process.exit(0);
|
||||
});
|
||||
}
|
||||
// Stay alive forever.
|
||||
setInterval(() => {}, 1 << 30);
|
||||
} catch (err) {
|
||||
console.error("[lvmh-bridge] failed to create agent session", err);
|
||||
process.exit(1);
|
||||
console.error("[lvmh-bridge] failed to create agent session", err);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user