[Unit]
Description=Odoo Server
After=network.service

[Service]
Type=simple
User={{ odoo_user }}
Group={{ odoo_user }}
Environment=PYTHONPATH={{ odoo_root_dir }}/app
ExecStart={{ odoo_root_dir }}/venv/bin/python3 {{ odoo_root_dir }}/app/setup/odoo -c {{ odoo_root_dir }}/etc/odoo-server.conf --proxy-mode{% if not odoo_db_manager %} --no-database-list{% endif %}

PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=full
ProtectHome=yes
NoNewPrivileges=yes
SyslogIdentifier=odoo
Restart=on-failure
StartLimitInterval=0
RestartSec=30
MemoryHigh=1800M
MemoryMax=2048M

[Install]
WantedBy=multi-user.target
