django-cms-quickstart icon indicating copy to clipboard operation
django-cms-quickstart copied to clipboard

Postgres port conflict when postgres is running on host

Open MacLake opened this issue 2 years ago • 0 comments

It’s not unusual that a web devoloper runs an own postgres instance on the host, which also uses port 5432. In this case django-cms-quickstart fails to launch as it also wants to expose port 5432 on the host.

  database_default:
  # …
    ports:
      - "5432:5432/tcp"  # allow your local dev env to connect to the db

Possible solutions:

  • Don’t expose the port on the host:
-  ":5432/tcp"  # Don’t allow your local dev env to connect to the db
  • Expose a non-standard port:
- "5433:5432/tcp"  # allow your local dev env to connect to the db on a non-standard port
  • Use an environment variable and let the user decide.

MacLake avatar Aug 10 '23 21:08 MacLake