From b434656d4bff2aa842f5eb53213b54aa7f10c577 Mon Sep 17 00:00:00 2001 From: Andrey Date: Fri, 31 Jul 2026 19:51:32 +0300 Subject: [PATCH] :ambulance: fix(deploy): mount postgres assets from CUSTOCRM_RELEASE_DIR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit init-runtime-roles.sh и reassign-schema-ownership.sql монтировались относительным путём ./deploy/postgres/, который резолвится относительно --project-directory (INSTANCE_DIR). Ассеты лежат только в релизе, в instance их нет — Docker создавал пустые директории, psql -f падал с «Is a directory», деплой валился на нормализации владения схемой. Приведено к единому эталонному паттерну ${CUSTOCRM_RELEASE_DIR} (как Caddyfile). compose.dev.yaml ассеты postgres не монтирует — дефекта там нет. --- compose.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compose.yaml b/compose.yaml index 8e1a715..5716487 100644 --- a/compose.yaml +++ b/compose.yaml @@ -28,8 +28,8 @@ services: POSTGRES_MIGRATION_PASSWORD: ${POSTGRES_MIGRATION_PASSWORD:?POSTGRES_MIGRATION_PASSWORD is required} volumes: - ${CUSTOCRM_INSTANCE_DIR:-.}/data/postgres:/var/lib/postgresql/data - - ./deploy/postgres/init-runtime-roles.sh:/docker-entrypoint-initdb.d/20-custocrm-runtime-roles.sh:ro - - ./deploy/postgres/reassign-schema-ownership.sql:/custocrm-reassign-ownership.sql:ro + - ${CUSTOCRM_RELEASE_DIR:-.}/deploy/postgres/init-runtime-roles.sh:/docker-entrypoint-initdb.d/20-custocrm-runtime-roles.sh:ro + - ${CUSTOCRM_RELEASE_DIR:-.}/deploy/postgres/reassign-schema-ownership.sql:/custocrm-reassign-ownership.sql:ro healthcheck: test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] interval: 10s