Update to 2022-07-25 16:00

This commit is contained in:
Daniel Berteaud
2022-07-25 16:00:15 +02:00
parent 9e88a5cd50
commit be9c0c5702
26 changed files with 387 additions and 310 deletions

View File

@@ -0,0 +1,14 @@
[options]
db_name = {{ odoo_db_name }}
db_host = {{ odoo_db_server }}
db_user = {{ odoo_db_user }}
db_password = {{ odoo_db_pass }}
addons_path = {{ odoo_root_dir }}/app/odoo/addons
workers = {{ odoo_workers }}
http_port = {{ odoo_http_port }}
longpolling_port = {{ odoo_longpolling_port }}
email_from = {{ odoo_email }}
smtp_server = localhost
data_dir = {{ odoo_root_dir }}/data
without_demo = ALL
init = base

View File

@@ -0,0 +1,22 @@
[Unit]
Description=Odoo Server
After=network.service
[Service]
Type=simple
User={{ odoo_user }}
Group={{ odoo_user }}
ExecStart={{ odoo_root_dir }}/venv/bin/python3 {{ odoo_root_dir }}/app/setup/odoo -c {{ odoo_root_dir }}/etc/odoo-server.conf --proxy-mode --no-database-list
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=full
ProtectHome=yes
NoNewPrivileges=yes
SyslogIdentifier=odoo
Restart=on-failure
StartLimitInterval=0
RestartSec=30
MemoryLimit=2048M
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,5 @@
#!/bin/sh
set -eo pipefail
rm -f {{ odoo_root_dir }}/backup/*

View File

@@ -0,0 +1,11 @@
#!/bin/sh
set -eo pipefail
PGPASSWORD={{ odoo_db_pass | quote }} /usr/pgsql-14/bin/pg_dump \
--format=custom \
--clean \
--username={{ odoo_db_user }} \
--host={{ odoo_db_server }} \
--file={{ odoo_root_dir }}/backup/{{ odoo_db_name }}.sqlc \
{{ odoo_db_name }}