diff --git a/docker-compose.yaml b/docker-compose.yaml index b14559c..34b5b80 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,10 +6,13 @@ services: - POSTGRES_DB=${POSTGRES_DB} - POSTGRES_USER=${POSTGRES_USER} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + # HA image's PGDATA is /home/postgres/pgdata/data, not /var/lib/postgresql/data. + # Mount the named volume there so data survives container rebuilds. + - PGDATA=/home/postgres/pgdata/data ports: - "5433:5432" volumes: - - timescale-data:/var/lib/postgresql/data + - timescale-data:/home/postgres/pgdata healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] interval: 10s