diff --git a/trobz_deploy/templates/odoo.service.j2 b/trobz_deploy/templates/odoo.service.j2 index 46d4bb8..3b82ac3 100644 --- a/trobz_deploy/templates/odoo.service.j2 +++ b/trobz_deploy/templates/odoo.service.j2 @@ -5,6 +5,7 @@ After=network.target postgresql.service [Service] Type=simple WorkingDirectory={{ instance_path }} +EnvironmentFile=-{{ instance_path }}/config/server.env ExecStart=bash -c "{{ venv_path }}/bin/python {{ venv_path }}/bin/odoo \ --config {{ instance_path }}/config/odoo.conf \ --addons-path $({{ odoo_addons_path }} {{ instance_path }})" diff --git a/trobz_deploy/templates/service.service.j2 b/trobz_deploy/templates/service.service.j2 index b3c1167..046112a 100644 --- a/trobz_deploy/templates/service.service.j2 +++ b/trobz_deploy/templates/service.service.j2 @@ -5,6 +5,7 @@ After=network.target [Service] Type=simple WorkingDirectory={{ instance_path }} +EnvironmentFile=-{{ instance_path }}/.env ExecStart={{ exec_start }} Restart=on-failure RestartSec=5s