Skip to content
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

enabling ssl #124

Closed
nurtureJamesTan opened this issue Feb 22, 2018 · 3 comments
Closed

enabling ssl #124

nurtureJamesTan opened this issue Feb 22, 2018 · 3 comments

Comments

@nurtureJamesTan
Copy link

hi,

how do we enable ssl with your pgmaster instance?
and also slaves and pgpool?

this one works with main stream postgresql
https://markwoodbridge.com/2017/08/16/postgres-docker-ssl.html

but does not work here

@paunin
Copy link
Owner

paunin commented Feb 25, 2018

looking on this: docker run -d --name postgres -v postgres:/var/lib/postgresql/data -v $PWD/server.crt:/var/lib/postgresql/data/server.crt -v $PWD/server.key:/var/lib/postgresql/data/server.key postgres:9-alpine -c ssl=on

I would suggest you to mount caert and keys whereever you want and configure the server with CONFIGS env variable:

#ssl = off				# (change requires restart)
#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
					# (change requires restart)
#ssl_prefer_server_ciphers = on		# (change requires restart)
#ssl_ecdh_curve = 'prime256v1'		# (change requires restart)
#ssl_cert_file = 'server.crt'		# (change requires restart)
#ssl_key_file = 'server.key'		# (change requires restart)
#ssl_ca_file = ''			# (change requires restart)
#ssl_crl_file = ''			# (change requires restart)

@paunin paunin closed this as completed Feb 25, 2018
@iranzo
Copy link

iranzo commented Dec 5, 2018

I've used configs to define server.crt and server.key plus ssl=on, and when trying to attach a config secret with mode 0400 it complains that it cannot read it.

Container image should chown the files as it does with $PGDATA on entrypoint so that it can later read it properly

@iranzo
Copy link

iranzo commented Dec 14, 2018

Handled in #205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants