mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-09 19:57:16 +02:00
feat(postgres): add split_postgres_connections filter and average pool fact
Compute POSTGRES_ALLOWED_AVG_CONNECTIONS once and propagate to app roles (gitlab, mastodon, listmonk, matrix, pretix, mobilizon, openproject, discourse). Fix docker-compose postgres command (-c flags split). Add unit tests. Minor env/locale tweaks and includes. Conversation: https://chatgpt.com/share/68b48e72-cc28-800f-9c21-270cbc17d82a
This commit is contained in:
@@ -31,11 +31,16 @@ params:
|
||||
#version: tests-passed
|
||||
|
||||
env:
|
||||
LC_ALL: en_US.UTF-8
|
||||
LANG: en_US.UTF-8
|
||||
LANGUAGE: en_US.UTF-8
|
||||
LC_ALL: "{{ HOST_LL_CC }}.UTF-8"
|
||||
LANG: "{{ HOST_LL_CC }}.UTF-8"
|
||||
LANGUAGE: "{{ HOST_LL_CC }}.UTF-8"
|
||||
#DISCOURSE_DEFAULT_LOCALE: {{ HOST_LL }} # Deactivated because not right format was selected @todo find right format
|
||||
|
||||
DB_POOL: "{{ POSTGRES_ALLOWED_AVG_CONNECTIONS }}"
|
||||
RAILS_MAX_THREADS: "{{ [ (POSTGRES_ALLOWED_AVG_CONNECTIONS | int), 5 ] | min }}"
|
||||
UNICORN_WORKERS: "{{ [ (POSTGRES_ALLOWED_AVG_CONNECTIONS | int) // 2, 1 ] | max }}"
|
||||
|
||||
|
||||
## How many concurrent web requests are supported? Depends on memory and CPU cores.
|
||||
## will be set automatically by bootstrap based on detected CPUs, or you can override
|
||||
UNICORN_WORKERS: 8
|
||||
|
Reference in New Issue
Block a user