fix(infra): use postgres -c flags instead of config_file override

The config_file override replaced the entire default PostgreSQL config
including listen_addresses, breaking inter-container communication.
Use inline -c flags instead which only override specific parameters.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-24 11:42:42 +01:00
parent fcd7c82ce4
commit e06e8cca59
2 changed files with 11 additions and 2 deletions

View file

@ -27,7 +27,6 @@ services:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mana123}
volumes:
- /Volumes/ManaData/postgres:/var/lib/postgresql/data
- ./docker/postgres/postgresql.conf:/etc/postgresql/conf.d/custom.conf:ro
ports:
- "5432:5432"
healthcheck:
@ -37,7 +36,14 @@ services:
retries: 5
command: >
postgres
-c 'config_file=/etc/postgresql/conf.d/custom.conf'
-c shared_buffers=512MB
-c effective_cache_size=2GB
-c work_mem=16MB
-c maintenance_work_mem=128MB
-c max_wal_size=1GB
-c max_wal_senders=3
-c log_min_duration_statement=1000
-c log_checkpoints=on
# PostgreSQL Backup — hourly pg_dumpall + daily pg_basebackup
# Retention: 48 hourly dumps + 30 daily base backups

View file

@ -1,6 +1,9 @@
# PostgreSQL Performance Tuning for Mac Mini (16GB RAM)
# Shared with ~70 other containers, so conservative settings
# Network (required for Docker inter-container communication)
listen_addresses = '*'
# Performance
shared_buffers = 512MB
effective_cache_size = 2GB