django-cms-quickstart
django-cms-quickstart copied to clipboard
Postgres port conflict when postgres is running on host
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.