The upstream openresty proxy in front of Dokploy strips the WebSocket Upgrade header, which kills noVNC. Publishing noVNC directly on a host port (16080) avoids the proxy entirely. Auth is still gated by VNC_PASSWORD. The dashboard continues to go through Traefik on its existing domain. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
reddit-bot:
|
|
build: .
|
|
container_name: reddit-bot
|
|
restart: unless-stopped
|
|
dns:
|
|
- 1.1.1.1
|
|
- 8.8.8.8
|
|
# Persist the database, browser session, and Matrix credentials in a
|
|
# named docker volume — a `./data` bind mount gets wiped on every Dokploy
|
|
# redeploy because the deploy dir is rebuilt, which loses the cookies and
|
|
# the captured Matrix token and triggers the slow re-login + token-sniff
|
|
# path on every restart.
|
|
volumes:
|
|
- reddit_bot_data:/app/data
|
|
# Dashboard goes through Traefik on a domain; noVNC needs the WebSocket
|
|
# upgrade header, which the upstream openresty proxy strips, so we
|
|
# publish noVNC directly on a host port and access it via the dokploy
|
|
# host's IP. Auth is handled by VNC_PASSWORD.
|
|
ports:
|
|
- "16080:6080" # noVNC, reachable as http://<dokploy-host>:16080/
|
|
expose:
|
|
- "3000" # Web dashboard (Traefik-routed)
|
|
environment:
|
|
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
|
|
- REDDIT_USERNAME=${REDDIT_USERNAME}
|
|
- REDDIT_PASSWORD=${REDDIT_PASSWORD}
|
|
# Chromium runs headed under Xvfb so a human can complete login over noVNC.
|
|
- BROWSER_HEADLESS=false
|
|
# Required to lock down the VNC endpoint.
|
|
- VNC_PASSWORD=${VNC_PASSWORD}
|
|
|
|
volumes:
|
|
reddit_bot_data:
|