gautada / postgresql-container

A basic Postgres from source
0 stars 0 forks source link

PostgeSQL

PostgreSQL PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.

Container

To get the container up and running you must provide your own pg_hba.conf, pg_ident.conf and postgresql.conf. The default config files from version 16 are attached in this project (comments removed) but you should override deployment config with configmaps.

SSL/TLS

TLS support is enabled by default. To to setup for testing use a self-signed certificate.

Create Self-Signed Certificate

Configure

# | SSL/TLS
# ╰―――――――――――――――――――――――――
ssl = on
ssl_key_file = '/mnt/volumes/secrets/tls.key'
ssl_cert_file = '/mnt/volumes/secrets/tls.crt'
#ssl_ca_file = ''
#ssl_crl_file = ''
#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
#ssl_prefer_server_ciphers = on
#ssl_ecdh_curve = 'prime256v1'
#ssl_min_protocol_version = 'TLSv1.2'
#ssl_max_protocol_version = ''
#ssl_dh_params_file = ''
#ssl_passphrase_command = ''
#ssl_passphrase_command_supports_reload = off

Availability

This container is designed to deploy in a kubernetes cluster. The deployment mechanism provides an availability of 99.9% (Downtime Monthly: 4m 21s). Higher availability is not needed as this database backs applications that have a limited user base and has zero public access.

Maintenance

Downtime due to maintenance is mitigated with local development environment based on compose and the CICD process.

Disaster Recovery

Currently disaster recover is manual. The container health mechanism should provide the advanced notice of disaster states that would cause down-time.

hc-disk hc-postgres

Notes