Shin Code log

Logs of solution for code
January 05, 2024

SQL Postgresql, run docker ssl mode

SQL Postgresql, run docker ssl mode

Enabling SSL for PostgreSQL in Docker by do the config:

database:
image: postgres:alpine
command: -c ssl=on -c ssl_cert_file=/var/lib/postgresql/server.crt -c ssl_key_file=/var/lib/postgresql/server.key
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
volumes:
- ./ca/server.crt:/var/lib/postgresql/server.crt
- ./ca/server.key:/var/lib/postgresql/server.key