diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index e60776e58..b90c1ac33 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -202,6 +202,15 @@ services: nofile: soft: 100000 hard: 100000 + # Pass the tuning values documented in .env.example to postgres. The + # fallbacks are the postgres:18 stock defaults, so nothing changes when + # the variables are not set. + command: > + postgres + -c max_connections=${POSTGRES_MAX_CONNECTIONS:-100} + -c shared_buffers=${POSTGRES_SHARED_BUFFERS:-128MB} + -c effective_cache_size=${POSTGRES_EFFECTIVE_CACHE_SIZE:-4GB} + -c maintenance_work_mem=${POSTGRES_MAINTENANCE_WORK_MEM:-64MB} volumes: - postgres_data:/var/lib/postgresql/data environment: