From 9091eed7d13572cc96e810bba1ef1daffd33db47 Mon Sep 17 00:00:00 2001 From: jjbrunton Date: Fri, 22 May 2026 21:19:22 +0100 Subject: [PATCH] Use a named docker volume for /app/data on Dokploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A ./data bind mount points at the deploy directory, which Dokploy rebuilds on every redeploy — wiping the SQLite db, the persistent browser session, and the cached Matrix credentials. That forced the slow re-login + chat.reddit.com token sniff on every container start. Switch to a named docker volume (reddit_bot_data) so the data directory survives rebuilds. Co-Authored-By: Claude Opus 4.7 --- docker-compose.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0158c44..622d0aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,9 +8,13 @@ services: dns: - 1.1.1.1 - 8.8.8.8 - # Mount the data directory to persist the database and browser session + # 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: - - ./data:/app/data + - 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: @@ -24,3 +28,6 @@ services: - BROWSER_HEADLESS=false # Required to lock down the VNC endpoint. - VNC_PASSWORD=${VNC_PASSWORD} + +volumes: + reddit_bot_data: