napcat / entrypoint.sh
flyminos's picture
Update entrypoint.sh
b89244e verified
Raw
History Blame Contribute Delete
691 Bytes
#!/bin/bash
set -e
# 启动 nginx
nginx -c /etc/nginx/nginx.conf
# 启动 Xvfb(必须比 x11vnc 先启动)
Xvfb :1 -screen 0 1920x1080x24 &
# 等待 Xvfb 就绪
sleep 3
# VNC 密码文件
VNC_PASSWD=${VNC_PASSWD:-vncpasswd}
mkdir -p /root/.vnc
echo -e "$VNC_PASSWD\n$VNC_PASSWD" | x11vnc -storepasswd /root/.vnc/passwd 2>/dev/null || true
# 启动 VNC Server
x11vnc -display :1 -forever -rfbauth /root/.vnc/passwd -listen 127.0.0.1 -rfbport 5900 &
# 启动 noVNC
websockify --web /usr/share/novnc 6081 localhost:5900 &
# 启动 QQ
DISPLAY=:1 qq --no-sandbox --disable-gpu &
# 启动 SnowLuma(用系统 Node)
cd /app/snowluma
node index.mjs &
# 保持运行
tail -f /dev/null