From 7c95ca65481667eca029a140c2384b7a7791198d Mon Sep 17 00:00:00 2001 From: Richard Sassine Date: Wed, 21 Apr 2021 16:51:53 +0300 Subject: initial commit --- src/SUMMARY.md | 7 ++++++ src/backups.md | 13 +++++++++++ src/installation.md | 11 +++++++++ src/running.md | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 97 insertions(+) create mode 100644 src/SUMMARY.md create mode 100644 src/backups.md create mode 100644 src/installation.md create mode 100644 src/running.md (limited to 'src') diff --git a/src/SUMMARY.md b/src/SUMMARY.md new file mode 100644 index 0000000..9b2ee76 --- /dev/null +++ b/src/SUMMARY.md @@ -0,0 +1,7 @@ +# Summary + +# Deploying Odoo + +- [Installing Odoo](./installation.md) +- [Running Odoo](./running.md) +- [Automated Backups](./backups.md) diff --git a/src/backups.md b/src/backups.md new file mode 100644 index 0000000..15b1093 --- /dev/null +++ b/src/backups.md @@ -0,0 +1,13 @@ +# Configuring Automated Backups + +In older versions of Odoo a simple POST request delivered by a `curl` command +within regular intervals via `cronie` would be enough for this. However, Odoo +v14.0 seems to have changed some aspect of the process and broken it. + +As an alternative we will be using +[this](https://github.com/Yenthe666/auto_backup) +module. + +Simply clone the repo into your addons path and install it.The settings are +accessable at `Settings > Technical > Back-Ups` and +`Settings > Technical > Automation` when in __debug mode__. diff --git a/src/installation.md b/src/installation.md new file mode 100644 index 0000000..69dd300 --- /dev/null +++ b/src/installation.md @@ -0,0 +1,11 @@ +# Installing Odoo +There are multiple ways to install Odoo but for development purposes a source +install is best for debugging and accessibility. + +For the most part following the +[Odoo documentation](https://www.odoo.com/documentation/14.0/setup/install.html#id7}) +will be enough as the packages they tell us to install will be present on most +mainstream GNU+Linux distributions such as Debian, Ubuntu, Fedora etc. + +On more obscure distributions like Void, Parabola and Gentoo users would +have to look for these packages themselves as naming can differ. diff --git a/src/running.md b/src/running.md new file mode 100644 index 0000000..cd5868a --- /dev/null +++ b/src/running.md @@ -0,0 +1,66 @@ +# Running The Server + +Once the source install is properly set up the Odoo instance can be started by +running the `odoo-bin` script in the install directory. This will run the odoo +instance and bind it to port 8069 which is the default. + +For more info pass the `--help` flag to the script. Here are some useful flags: +- `-d` tells the script you want a specific databse to be selected. Also hides + other databases from the selector. +- `-p` sets the port the instance will bind to +- `--addons-path` used to specify additional addon paths (like your development + environment) +- `-s` saves certain options in the `~/.odoorc` file so you don't have to pass + them to the launcher script every time. Use this once to easily configure + your instance instead of editing the `~/.odoorc` file manually. + +# Configuring Services + +Odoo's community code repository includes a service file fittign for +SystemD-based distributions. Here are the steps to enable it: + +1. Make a simple bash script to run the `odoo-bin` script with + instance-specific arguments like so: + ``` + #!/bin/bash + ./odoo-bin -p [port] -c [path/to/configuration/file/for/this/instance] -d [databases name] --no-database-list + ``` + Then give it excecution permissions: + ``` + chmod +x [path/to/your/script] + ``` + +2. Make a SystemD service in `/usr/lib/systemd/system/` to launch and monitor + your launching script at boot: + ``` + [Unit] + Description=Odoo + After=postgresql.service + + [Service] + Type=simple + User=[your username] + Group=[your username] + WorkingDirectory=[path/to/scripts/working/directory] + ExecStart=[path/to/your/launch/script] + + [Install] + WantedBy=multi-user.target + ``` + +3. Enable the service so that it runs on boot. + ``` + sudo systemctl enable odoo.service + ``` + +4. Start the service. + ``` + sudo systemctl start odoo.service + ``` + +## Running Multiple Instances + +To run additional services simply make seperate scripts and service files for +each while changing arguments accordingly (especially the port number). + + -- cgit v1.2.3