Remove NAS constraint from DB, add PostgreSQL performance tuning parameters

This commit is contained in:
Bendt
2026-02-16 16:08:59 -05:00
parent 4cd7b26c58
commit b206bb0049

View File

@@ -7,6 +7,21 @@ services:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: posse_party POSTGRES_DB: posse_party
# Performance tuning for 8GB RAM systems
POSTGRES_INITDB_ARGS: "--encoding=UTF8 --locale=en_US.UTF-8"
command: >
postgres
-c shared_buffers=2GB
-c effective_cache_size=6GB
-c work_mem=16MB
-c maintenance_work_mem=512MB
-c random_page_cost=1.1
-c effective_io_concurrency=200
-c wal_buffers=16MB
-c min_wal_size=1GB
-c max_wal_size=4GB
-c max_connections=100
-c log_min_duration_statement=1000
healthcheck: healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"] test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s interval: 5s
@@ -17,9 +32,7 @@ services:
networks: networks:
- posseparty-network - posseparty-network
deploy: deploy:
placement: # Allow to run on any node (not just NAS)
constraints:
- node.labels.type == nas
restart_policy: restart_policy:
condition: on-failure condition: on-failure