-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider using "expose:" vs. "ports" in the docker compose yaml. #116
Comments
Which ports do you think we shouldn't have open to the external environment? |
Any/all ports that belong to a db or API. I had a hell of a time with cryptominers and other malware invading my docker environment on GCP. Specifically kdevtmpfsi (kinsing) and a hotfuzz variant. |
Understood. I think we can shift to expose for all services but these:
Others exist in the experimental Perseus services and have just been adopted from that repo. But we could try limiting those. |
Agreed. I think we should either enforce or strongly urge users to use strong passwords and non-standard ports if the ports are bound vs. exposed. For example, instead of postgres/mypass on port 5432 as the default, perhaps we should change those default parameters? |
I just pushed some changes to develop to really scale back the number of external ports:
Let's examine the last 2, but thanks @sudoshi for the push towards fewer external ports! |
@alondhe - this is the part of docker-compose.yml that I modified from the original Broadsea docker compose yaml:
This enables the traefik dashboard where you can see ALL the ports being managed by the reverse proxy and the routes and middleware specified in the traefik.yml configuration file. It took me a few days to get it to work, and I don't know how to create a pull request (I'll learn this weekend - now that I have a reason to!), so if you want to incorporate it, please do. https://sandbox.acumenus.net/dashboard/ results in: https://www.web2generators.com/apache-tools/htpasswd-generator |
Consider using the expose parameter for all ports that do not need to be bound to the docker host external environment. This will reduce conflicts between application stacks running on the same docker host (ie Perseus and Broadsea). It also increases security by ensuring that key services are only available within the docker network.
In the case of Traefik, this will allow one instance of the container to serve as reverse proxy across multiple networks and manage SSL for all stacks. Explained here: (https://ioflood.com/blog/docker-compose-ports-vs-expose-explained/#:~:text='Expose'%20is%20used%20for%20inter,the%20host%20machine%20and%20beyond.)
The text was updated successfully, but these errors were encountered: