Proposed Changes
Volume Mapping (PostgreSQL 18 Layout)
1- Modify dc_master.yaml to mount the volume at the parent level. This allows the PostgreSQL engine to manage its own internal versioning structure.
From: /var/lib/postgresql/data
To: /var/lib/postgresql
2- Automation
Update the preparation script to ensure the local host directory exists before the container starts, preventing permission mapping issues.
3. Dockerfile.tpl Adjustments
Ensure the system user remapping logic correctly handles the system postgres user while allowing the database engine to start with the environment-defined POSTGRES_USER.
4. Health Check Correction
use the specific user defined in the project configuration:
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
Proposed Changes
Volume Mapping (PostgreSQL 18 Layout)
1- Modify dc_master.yaml to mount the volume at the parent level. This allows the PostgreSQL engine to manage its own internal versioning structure.
From:
/var/lib/postgresql/dataTo:
/var/lib/postgresql2- Automation
Update the preparation script to ensure the local host directory exists before the container starts, preventing permission mapping issues.
3. Dockerfile.tpl Adjustments
Ensure the system user remapping logic correctly handles the system postgres user while allowing the database engine to start with the environment-defined POSTGRES_USER.
4. Health Check Correction
use the specific user defined in the project configuration: