Files
RedditBot/docker-compose.yml
T

38 lines
1.4 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
# Ports are NOT published to the host. Dokploy/Traefik routes traffic
# to the container's internal ports via configured domains.
expose:
- "3000" # Web dashboard
- "6080" # noVNC for human login
environment:
- OPENROUTER_API_KEY=${OPENROUTER_API_KEY}
# Required whenever the web dashboard is enabled; never commit its value.
- WEB_DASHBOARD_TOKEN=${WEB_DASHBOARD_TOKEN}
- 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}
# Public Traefik route used by the dashboard's recovery button.
- NOVNC_PUBLIC_URL=https://red-vnc.apps.jbrunton.co.uk
volumes:
reddit_bot_data: