From 764d887d47e814f25024a389ccd5de1827ce1dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= <theo@le-filament.com> Date: Tue, 31 May 2022 11:41:22 +0200 Subject: [PATCH] feat: allow to change database max connections --- templates/odoo.conf.j2 | 12 ++++-------- templates/prod.yaml.j2 | 3 +++ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/templates/odoo.conf.j2 b/templates/odoo.conf.j2 index 1358a27..ee0b26f 100644 --- a/templates/odoo.conf.j2 +++ b/templates/odoo.conf.j2 @@ -1,23 +1,19 @@ [options] addons_path = /opt/odoo/odoo/addons,/opt/odoo/additional_addons,/opt/odoo/private_addons data_dir = /opt/odoo/data +; csv_internal_sep = , +db_maxconn = {{ odoo_db_maxconn | default(64) }} +; db_template = template1 +; dbfilter = .* {% if odoo_prod is defined %} admin_passwd = {{ odoo_prod.master_pass }} -; csv_internal_sep = , -; db_maxconn = 64 db_name = {{ odoo_prod.db }} db_password = {{ odoo_prod.db_pass }} -; db_template = template1 -; dbfilter = .* db_user = {{ odoo_prod.db_user }} {% else %} admin_passwd = {{ item.master_pass }} -; csv_internal_sep = , -; db_maxconn = 64 db_name = {{ item.db }} db_password = {{ item.db_pass }} -; db_template = template1 -; dbfilter = .* db_user = {{ item.db_user }} {% endif %} ; debug_mode = False diff --git a/templates/prod.yaml.j2 b/templates/prod.yaml.j2 index 54db4c6..1d031c7 100644 --- a/templates/prod.yaml.j2 +++ b/templates/prod.yaml.j2 @@ -64,6 +64,9 @@ services: POSTGRES_DB: "postgres" POSTGRES_USER: "{{ odoo_prod.db_user }}" POSTGRES_PASSWORD: "{{ odoo_prod.db_pass }}" +{% if postgres_options is defined %} + PGOPTIONS: "{{ postgres_options }}" +{% endif %} labels: co.elastic.logs/module: postgresql {% if odoo_remote_db_access %} -- GitLab