diff --git a/posse-party-stack.yml b/posse-party-stack.yml index 62f6a80..b1d3300 100644 --- a/posse-party-stack.yml +++ b/posse-party-stack.yml @@ -7,6 +7,21 @@ services: POSTGRES_USER: postgres POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} 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: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s @@ -17,9 +32,7 @@ services: networks: - posseparty-network deploy: - placement: - constraints: - - node.labels.type == nas + # Allow to run on any node (not just NAS) restart_policy: condition: on-failure