mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-11-02 11:18:09 +00: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:
@@ -40,7 +40,7 @@
|
||||
"client_secret": OIDC.CLIENT.SECRET
|
||||
} | to_json }}
|
||||
|
||||
- name: Update administrator email and password login in Listmonk
|
||||
- name: Update administrator email and password login in Listmonk (as superuser)
|
||||
shell: |
|
||||
docker exec -i {{ database_host }} psql \
|
||||
-U {{ database_username }} \
|
||||
|
||||
@@ -16,8 +16,8 @@ password = "{{ database_password }}"
|
||||
database = "{{ database_name }}"
|
||||
|
||||
ssl_mode = "disable"
|
||||
max_open = 25
|
||||
max_idle = 25
|
||||
max_open = {{ POSTGRES_ALLOWED_AVG_CONNECTIONS }}
|
||||
max_idle = {{ ( POSTGRES_ALLOWED_AVG_CONNECTIONS | int // 2 ) }}
|
||||
max_lifetime = "300s"
|
||||
|
||||
# Optional space separated Postgres DSN params. eg: "application_name=listmonk gssencmode=disable"
|
||||
|
||||
Reference in New Issue
Block a user