DataExpert-io/data-engineer-handbook

docker-compose.yml port specification in wrong order

gitgithan opened this issue · 1 comments

This is in materials/1-dimensional-data-modeling folder. If we could create github Labels that helps filtering and saves typing

    ports:
      - "${CONTAINER_PORT}:5432"

Shouldn't it be ${HOST_PORT}:${CONTAINER_PORT}?

Order specified at https://docs.docker.com/get-started/docker-concepts/running-containers/publishing-ports/

Also HOST_PORT=5432 was defined in .env but not used

I think it makes sense to change it to:

    ports:
      - "${HOST_PORT}:5432"

Since the container port is something that we cannot control, because postgres is exposed to 5432 by default