build: optimize Postgres container configuration for performance and stability
Updated `dc-infra.yaml` to enable automatic restart (`unless-stopped`), introduce dynamic memory allocations via environment variables, and adjust healthcheck intervals for reduced load. Enhanced `postgresql.conf` with performance tuning comments, schema search path inclusion for Keycloak and app users, and SSL adjustments for internal communication.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
# PostgreSQL Configuration File
|
||||
# Optimized for Meldestelle application
|
||||
|
||||
# Alle anderen Performance-Werte (shared_buffers etc.) können hier auf
|
||||
# den niedrigen Werten bleiben, da sie durch den 'command' oben
|
||||
# in der docker-compose dynamisch überschrieben werden.
|
||||
|
||||
# Connection Settings
|
||||
listen_addresses = '*'
|
||||
max_connections = 100
|
||||
@@ -65,8 +69,9 @@ autovacuum_analyze_scale_factor = 0.025
|
||||
autovacuum_vacuum_cost_delay = 20ms
|
||||
autovacuum_vacuum_cost_limit = 2000
|
||||
|
||||
# Statement Behavior
|
||||
search_path = '"$user", public'
|
||||
# OPTIMIERUNG: Search Path für Keycloak und App-User
|
||||
# Postgres sucht erst im Schema des Users, dann in public, dann in keycloak.
|
||||
search_path = '"$user", public, keycloak'
|
||||
row_security = on
|
||||
|
||||
# Client Connection Defaults
|
||||
@@ -78,7 +83,7 @@ idle_in_transaction_session_timeout = 600000 # 10 minutes, prevents idle transa
|
||||
# Disk
|
||||
temp_file_limit = 1GB # Limits temp file size
|
||||
|
||||
# SSL
|
||||
# OPTIMIERUNG: SSL deaktiviert lassen für interne Kommunikation
|
||||
ssl = off
|
||||
ssl_prefer_server_ciphers = on
|
||||
|
||||
|
||||
Reference in New Issue
Block a user