diff --git a/participantes/maxsonferovante-python/docker-compose.yml b/participantes/maxsonferovante-python/docker-compose.yml index c6c844211..b7acbcea9 100644 --- a/participantes/maxsonferovante-python/docker-compose.yml +++ b/participantes/maxsonferovante-python/docker-compose.yml @@ -12,7 +12,8 @@ services: - "5432:5432" volumes: - ./init.sql:/docker-entrypoint-initdb.d/init.sql - command: postgres -c fsync=off -c full_page_writes=off -c synchronous_commit=off -c log_min_messages=PANIC -c autovacuum=off + - ./postgresql.conf:/etc/postgresql/postgresql.conf:ro + command: postgres -c config_file=/etc/postgresql/postgresql.conf healthcheck: test: ["CMD-SHELL", "pg_isready -U rinha"] interval: 5s @@ -25,8 +26,7 @@ services: memory: "374MB" api1: &api - image: quay.io/maxsonferovante/rinhabackendmaxsonferovante2024q - build: . + image: maxsonferovante/rinhabackendmaxsonferovante2024q hostname: api1 environment: - rinha_database_url=postgres://rinha:rinha@db:5432/rinha diff --git a/participantes/maxsonferovante-python/postgresql.conf b/participantes/maxsonferovante-python/postgresql.conf new file mode 100644 index 000000000..bd23df8a0 --- /dev/null +++ b/participantes/maxsonferovante-python/postgresql.conf @@ -0,0 +1,11 @@ +listen_addresses = '*' +max_connections = 60 +shared_buffers = 90MB +work_mem = 2MB +maintenance_work_mem = 20MB +effective_cache_size = 190MB +fsync = off +full_page_writes = off +synchronous_commit = off +log_min_messages = PANIC +autovacuum = off \ No newline at end of file