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.
This commit is contained in:
parent
a2c05a5d97
commit
52d63457ff
1 changed files with 16 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue