🚑 fix(deploy): mount postgres assets from CUSTOCRM_RELEASE_DIR

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 не монтирует — дефекта там нет.
This commit is contained in:
Andrey committed 2026-07-31 19:51:32 +03:00
1 parent e697807811
commit b434656d4b
1 file changed
+2 -2
+2 -2
View File
@@ -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