Welcome to Headwind MDM Q&A, where you can ask questions and receive answers from other members of the community.

Please do not post bug reports, missing feature requests, or demo inquiries. If you have such an inquiry, submit a contact form.

0 votes

I am using the official Github Repo for hmdm-docker. I tried the below "docker-compose.yaml" content to connect from the Headwind MDM Container to the Postgresql Container with a custom host and port. But it's not working well.

postgresql:

image: postgres:12-alpine

networks:

- hmdm-network

healthcheck:

test: ["CMD-SHELL", "pg_isready -U ${SQL_USER} -d ${SQL_BASE}"]

interval: 10s

timeout: 5s

retries: 5

start_period: 30s

ports:

- 5434:5432

environment:

POSTGRES_USER: ${SQL_USER}

POSTGRES_PASSWORD: ${SQL_PASS}

POSTGRES_DB: ${SQL_BASE}

POSTGRES_HOST: ${SQL_HOST}

POSTGRES_PORT: ${SQL_PORT}

by (140 points)

1 Answer

0 votes

The default docker-compose setup of Headwind MDM runs PostgreSQL in a local container, and connects Headwind MDM container to that local container, see the original docker-compose.yaml file.

To connect the Headwind MDM Docker container to an external PostgreSQL database, make the following changes in docker-compose.yaml:

1. Remove (comment out) the postgresql section, as you don't need a local container any more

2. Adjust the SQL_HOST, SQL_USER, SQL_BASE and SQL_PASS parameters in the hmdm:environment section (you need to fill them with the appropriate access credentials).

by (39.1k points)
...