From 27f52fca49e9c9ec6301eb357c0980938bf51dab Mon Sep 17 00:00:00 2001 From: Keshav Priyadarshi Date: Wed, 8 Jan 2025 14:41:23 +0530 Subject: [PATCH 1/2] Apply custom config to postgres docker image Signed-off-by: Keshav Priyadarshi --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 506c2a7..b61c9ce 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,9 +3,11 @@ version: '3' services: db: image: postgres:13 + command: -c config_file=/etc/postgresql/postgresql.conf env_file: - docker.env volumes: + - ./etc/postgresql/postgresql.conf:/etc/postgresql/postgresql.conf - db_data:/var/lib/postgresql/data/ web: From 85376037f971a4a2b99de985656b820b0cc6a895 Mon Sep 17 00:00:00 2001 From: Keshav Priyadarshi Date: Wed, 8 Jan 2025 15:36:23 +0530 Subject: [PATCH 2/2] Add default postgres config Signed-off-by: Keshav Priyadarshi --- etc/postgresql/postgresql.conf | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 etc/postgresql/postgresql.conf diff --git a/etc/postgresql/postgresql.conf b/etc/postgresql/postgresql.conf new file mode 100644 index 0000000..2bf294d --- /dev/null +++ b/etc/postgresql/postgresql.conf @@ -0,0 +1,8 @@ +# Default postgresql.conf + +listen_addresses = '*' +max_connections = 100 +shared_buffers = 128MB +dynamic_shared_memory_type = posix +max_wal_size = 1GB +min_wal_size = 80MB