SystemD startup script for odoo installed using docker

Install odoo using Docker containers is a pretty cool way of deployment. But, there is one missing part of the official manual of odoo is to make a startup script for the containers for easy start/stop the containers. This is it:

1. Create the folder to hold the docker-compose.yml file:

sudo mkdir /odoo

2. Create the docker-compose.yml file in that folder with the following content:



3. Create the startup script:

sudo nano /etc/systemd/system/odoo.service



4. Enable the odoo service for it to start automatically when rebooting:

sudo systemctl enable odoo

5. Start odoo and profit

sudo systemctl start odoo