feat(agy-web): deploy persistent ttyd+tmux AGY web workbench at https://agy.961504.xyz

Browse Source
This commit is contained in:
Yin Kou committed 2026-11-06 22:48:45 +08:00
1 parent 88af316845
commit b4358f74c0
5 files changed
+61 -2

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
# ==============================================================================
# start-agy-web.sh
# 用途:在 Mac mini 上启动基于 ttyd + tmux 的 24 小时常驻 AGY Web 工作台
# 监听端口:0.0.0.0:7681 (外网由 Caddy HTTPS + Basic Auth 保护)
# ==============================================================================
export PATH="/Users/ixvii0iv/.local/bin:/Users/ixvii0iv/.orbstack/bin:/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export TERM="xterm-256color"
mkdir -p "$HOME/workspace"
# 确保 tmux 会话 agy 存在并在其中默认打开 zsh (可直接运行 agy)
if ! /opt/homebrew/bin/tmux has-session -t agy 2>/dev/null; then
/opt/homebrew/bin/tmux new-session -d -s agy -c "$HOME/workspace"
/opt/homebrew/bin/tmux send-keys -t agy "agy" C-m
fi
exec /opt/homebrew/bin/ttyd \
-W \
-p 7681 \
-t fontSize=15 \
-t 'titleFixed=Mac mini (M6) - AGY 云端工作台' \
/opt/homebrew/bin/tmux new-session -A -s agy -c "$HOME/workspace"