mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:21:10 +02:00
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:
parent
fcd7c82ce4
commit
e06e8cca59
2 changed files with 11 additions and 2 deletions
|
|
@ -27,7 +27,6 @@ services:
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mana123}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-mana123}
|
||||||
volumes:
|
volumes:
|
||||||
- /Volumes/ManaData/postgres:/var/lib/postgresql/data
|
- /Volumes/ManaData/postgres:/var/lib/postgresql/data
|
||||||
- ./docker/postgres/postgresql.conf:/etc/postgresql/conf.d/custom.conf:ro
|
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|
@ -37,7 +36,14 @@ services:
|
||||||
retries: 5
|
retries: 5
|
||||||
command: >
|
command: >
|
||||||
postgres
|
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
|
# PostgreSQL Backup — hourly pg_dumpall + daily pg_basebackup
|
||||||
# Retention: 48 hourly dumps + 30 daily base backups
|
# Retention: 48 hourly dumps + 30 daily base backups
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
# PostgreSQL Performance Tuning for Mac Mini (16GB RAM)
|
# PostgreSQL Performance Tuning for Mac Mini (16GB RAM)
|
||||||
# Shared with ~70 other containers, so conservative settings
|
# Shared with ~70 other containers, so conservative settings
|
||||||
|
|
||||||
|
# Network (required for Docker inter-container communication)
|
||||||
|
listen_addresses = '*'
|
||||||
|
|
||||||
# Performance
|
# Performance
|
||||||
shared_buffers = 512MB
|
shared_buffers = 512MB
|
||||||
effective_cache_size = 2GB
|
effective_cache_size = 2GB
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue