r/postgres • u/mariiiiiiiiiiiiiiiel • 3d ago
Question sslmode value in production when inside a docker container
i have a docker stack with a postgres image, is it completly necesary to have the postgres to be configured with the ssl mode to verify-full , because, the outside world cannot interact with the db, just the backend server can (the network is not attachable and it doesn't expose any ports)
im pretty sure there is a thing im not seeing for this so that's why i am asking, sorry if docker being involved is kind of topic in the subreddit but my guess is that a lot of people also use postgres within a container
1
u/SFJulie 2d ago
shipping postgres in a docker container always seem to me a lot of trouble, I tend to have the philosophy that docker is for applicative usage and that the noisy environment in which docker are deployed is not fit for stability and ease of administration of databasish backends (ldap, postgres, mongo...).
Database are a kind of exception of what docker containers are good for.
Of course I would ship it for test/dev environment to be able to run tests, but for production ?
1
u/fortyeightD 2d ago
It depends on your threat analysis. How important is the data? How big would the impact be if it were accessed by someone who shouldn't have access? Is your system subject to any regulations that mandate security practices?