add unix socket for postgres

This commit is contained in:
Artur Gurgul1 2025-08-08 10:17:01 +02:00
parent 2054a68af0
commit 2289379ad5
9 changed files with 32 additions and 29 deletions

View file

@ -0,0 +1,3 @@
local all all peer
#hostssl all all 0.0.0.0/0 scram-sha-256
host all all 127.0.0.1/32 trust

View file

@ -3,10 +3,10 @@ Description=PostgreSQL <%= version %>
After=network.target
[Service]
# Type=notify
Type=simple
Type=notify
#Type=simple
User=postgresql
User=postgres
Group=services
ExecStart=<%= postgres_bin %> -D <%= database_dir %>
@ -23,9 +23,9 @@ NotifyAccess=all
# Security
#ProtectSystem=full
#ProtectHome=true
#ReadWritePaths=<%= database_dir %>
ReadWritePaths=<%= database_dir %>
PrivateTmp=true
# PrivateTmp=true
NoNewPrivileges=true
# Resource Limits

View file

@ -8,17 +8,20 @@
listen_addresses = '*'
port = 5432
max_connections = 100
unix_socket_directories = '<%= unix_socket %>'
#unix_socket_directories = '<%= unix_socket %>'
unix_socket_directories = '/tmp'
password_encryption = scram-sha-256
## TODO Add support for ssl
### TODO Add support for ssl
#ssl = on
#
##ssl_ca_file = ''
#ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
##ssl_crl_file = ''
##ssl_crl_dir = ''
#ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
#ssl_ca_file = ''
ssl_cert_file = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
#ssl_crl_file = ''
#ssl_crl_dir = ''
ssl_key_file = '/etc/ssl/private/ssl-cert-snakeoil.key'
#ssl_ciphers = 'HIGH:MEDIUM:+3DES:!aNULL' # allowed SSL ciphers
#ssl_prefer_server_ciphers = on
#ssl_ecdh_curve = 'prime256v1'

View file

@ -1,2 +0,0 @@
local all all peer
hostssl all all 0.0.0.0/0 scram-sha-256

View file

@ -1,4 +0,0 @@
<%= te %>