From 52d63457ff52cd3e5a3e397856c0494517338be7 Mon Sep 17 00:00:00 2001 From: ZdenekSrotyr Date: Tue, 21 Apr 2026 16:42:23 +0200 Subject: [PATCH] fix(prod): bind docker data volume to host /data for persistent disk Without this override, docker-compose creates a named volume 'agnes_data' on the boot disk, ignoring any persistent disk mounted at /data by the VM startup script. This override makes the 'data' volume a bind mount to host /data, so persistent disks work as expected. --- docker-compose.prod.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 3e45171..614acb5 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,4 +1,7 @@ -# Production override — uses pre-built GHCR image instead of local build. +# Production override — uses pre-built GHCR image instead of local build, +# and binds the `data` volume to /data on the host (so persistent-disk mounts +# at /data are used by all services). +# # Usage: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d # Override tag: AGNES_TAG=stable-2026.04.3 docker compose -f ... up -d services: @@ -16,3 +19,15 @@ services: image: ghcr.io/keboola/agnes-the-ai-analyst:${AGNES_TAG:-stable} session-collector: image: ghcr.io/keboola/agnes-the-ai-analyst:${AGNES_TAG:-stable} + +# Override the `data` named volume to bind-mount /data from the host. +# This ensures a persistent disk mounted at /data (by Terraform startup +# script) is the actual backing store, not a Docker-managed volume on the +# boot disk. +volumes: + data: + driver: local + driver_opts: + type: none + o: bind + device: /data