From 650e56878d065e7e23ccc5048be3e94314439b03 Mon Sep 17 00:00:00 2001 From: Denis Vasilenkov Date: Mon, 18 May 2026 17:39:27 +0300 Subject: [PATCH] bump postgres 13.1 -> 18.3 with explicit PGDATA ## Problem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `postgres:18+` changed default `PGDATA` to `/var/lib/postgresql/18/docker`. With existing mount `./postgres/data:/var/lib/postgresql/data`, the container fails on first start with `unused mount/volume` — even on an empty directory. ## Fix - Bump image `postgres:13.1` → `postgres:18.3` (minor pinned per convention) - Set `PGDATA=/var/lib/postgresql/data/pgdata` to keep existing mount and place pg18 data in a subdirectory (workaround suggested by the postgres image itself) ## Validation Reproduced and verified end-to-end on sandbox (postgres:18.3 / Debian 13) and on MOEX pilot deployment (2026-05-18). All 7 services healthy, `./postgres/data/pgdata/` initialised correctly. Refs: docker-library/postgres#1259, docker-library/postgres#37 --- examples/pilot-letsencrypt/compose.yaml | 3 ++- examples/pilot/compose.yaml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/pilot-letsencrypt/compose.yaml b/examples/pilot-letsencrypt/compose.yaml index 29e5260..dd95b1d 100644 --- a/examples/pilot-letsencrypt/compose.yaml +++ b/examples/pilot-letsencrypt/compose.yaml @@ -25,9 +25,10 @@ services: postgres: restart: unless-stopped - image: postgres:13.1 + image: postgres:18.3 environment: - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - PGDATA=/var/lib/postgresql/data/pgdata healthcheck: test: pg_isready -U postgres interval: 10s diff --git a/examples/pilot/compose.yaml b/examples/pilot/compose.yaml index f9db889..278458e 100644 --- a/examples/pilot/compose.yaml +++ b/examples/pilot/compose.yaml @@ -25,9 +25,10 @@ services: postgres: restart: unless-stopped - image: postgres:13.1 + image: postgres:18.3 environment: - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} + - PGDATA=/var/lib/postgresql/data/pgdata healthcheck: test: pg_isready -U postgres interval: 10s