hedonhermdev / hedonhermdev/django-on-docker

Exposing psql port on host system unneeded

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
13
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Hi thanks for putting out this solid example of how to deploy Django with Docker.

Something stuck out to me as unneeded and exposing a potential security issue for someone in the future.
```
ports:
- 5432:5432
```
This line will open the psql daemon to the host system, which is not necessary as the `postgres` image will `expose` that port, making it available to other containers on the same network. I've tested at it works fine without that line. Just a quick suggestion that might save someone a headache in the future.

https://github.com/hedonhermdev/django-on-docker/blob/5aaf9387df2346ae955f61e87dc78bcdaba3c75a/deployment-project/docker-compose.yaml#L10-L11

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.