feat: add VNC toggle to dashboard

- Add x11vnc + noVNC container with Traefik reverse proxy
- Add /api/vnc_status and toggle_vnc action to FastAPI
- Add VNC toggle button to BotVPS dashboard
- VNC off by default, controlled via dashboard
This commit is contained in:
2026-05-03 19:42:00 +00:00
parent 912763b3f1
commit 9762e9b76c
5 changed files with 151 additions and 46 deletions

View File

@@ -1,32 +1,47 @@
version: '3.8'
services:
vps-agent:
build: .
container_name: vps-ai-agent
restart: unless-stopped
expose:
- "8001"
ports:
- "8001:8001"
# Monta as credenciais e o socket do docker para o Bot conseguir comandar a VPS raiz!
volumes:
- .:/app
- /var/run/docker.sock:/var/run/docker.sock:rw
- /:/host_root:ro # Acesso em leitura à VPS para análise
- ./data:/app/data # Configs dinâmicas (API Keys, etc)
env_file:
- .env
networks:
- coolify
- ollama_net
labels:
- "traefik.enable=true"
- "traefik.http.routers.vps-agent.rule=Host(`claw.reifonas.cloud`)"
- "traefik.http.routers.vps-agent.entrypoints=https"
- "traefik.http.routers.vps-agent.tls=true"
- "traefik.http.routers.vps-agent.tls.certresolver=letsencrypt"
- "traefik.http.services.vps-agent.loadbalancer.server.port=8001"
vps-agent:
build: .
container_name: vps-ai-agent
restart: unless-stopped
expose:
- "8001"
ports:
- "8001:8001"
volumes:
- .:/app
- /var/run/docker.sock:/var/run/docker.sock:rw
- /:/host_root:ro
- ./data:/app/data
env_file:
- .env
networks:
- coolify
- ollama_net
labels:
- "traefik.enable=true"
- "traefik.http.routers.vps-agent.rule=Host(`claw.reifonas.cloud`)"
- "traefik.http.routers.vps-agent.entrypoints=https"
- "traefik.http.routers.vps-agent.tls=true"
- "traefik.http.routers.vps-agent.tls.certresolver=letsencrypt"
- "traefik.http.services.vps-agent.loadbalancer.server.port=8001"
vnc:
build: ./vnc
container_name: vps-vnc
restart: unless-stopped
ports:
- "6080:6080"
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix:rw
networks:
- coolify
labels:
- "traefik.enable=true"
- "traefik.http.routers.vnc.rule=Host(`vnc.claw.reifonas.cloud`)"
- "traefik.http.routers.vnc.entrypoints=http"
- "traefik.http.services.vnc.loadbalancer.server.port=6080"
networks:
coolify: