Articles on: 💟 Odoo Cloud & Hodiploy
This article is also available in:

How should I organise my Git repository for Hodiploy?

Your Git repository is deployed as-is: on every push, Hodiploy clones it and its content becomes the custom modules folder of your Odoo instance. Organised the right way, it deploys with no extra configuration. This article describes the expected layout; to connect the repository to an instance, see Does Hodiploy support deployment via Git? instead.


The golden rule: the root of your repository is the instance's addons folder. One Odoo module = one folder at the root, containing its __manifest__.py. Your Git submodules are added automatically, and you can declare more subfolders in the instance configuration.


The expected layout


your-repo/
├── my_module/
│ ├── __manifest__.py
│ ├── models/
│ └── views/
├── other_module/
│ └── __manifest__.py
└── requirements.txt (optional)


  • Every top-level folder containing a __manifest__.py file is treated as an Odoo module
  • A module placed in a subfolder (addons/, extra-addons/, src/, and so on) is not seen by default: Odoo never looks inside subfolders. See the next section to declare it
  • Extra files at the root (README, .gitignore...) are harmless: only folders carrying a manifest count


Modules placed in subfolders


If your modules are not all at the root, tell Hodiploy where to find them, in the GIT access section of the instance configuration, under Module locations:


  • Subfolders to declare: add the path of each folder that holds modules, relative to the repository root (for example extra-addons or oca/web). Folders are read in the order of the list, after the root
  • Search subfolders for modules: tick this box so that Hodiploy automatically declares, on every deployment, every folder of the repository that holds modules, at any depth


For example, with this repository, declare extra-addons so that product_multi_barcode is visible:


your-repo/
├── my_module/
│ └── __manifest__.py
└── extra-addons/
└── product_multi_barcode/
└── __manifest__.py


Good to know:


  • A declared folder that holds no module (a typo, an empty folder) is simply skipped, without blocking the deployment
  • If two folders hold a module with the same name, the first one in order (root, submodules, then subfolders) is used, as in Odoo
  • Changing these settings restarts the instance (a few seconds), without cloning the repository again. A new module then shows up in the Apps menu after Update Apps List


Third-party modules: Git submodules


As on Odoo.sh, Git submodules are fetched on every deployment (without their history), and each one is declared to Odoo automatically. It is the simplest way to ship OCA modules:


git submodule add https://github.com/OCA/web.git oca/web


The submodule must be reachable with the same rights as your repository:


  • GitHub connection: submodules hosted on GitHub must be among the repositories authorised for the Hodiploy App (public repositories, such as the OCA's, always are)
  • SSH key: the instance's key must have access to every private submodule. On GitHub, a deploy key only works for a single repository: prefer the GitHub connection then, or public submodules


An unreachable submodule makes the deployment fail, rather than starting the instance without its modules.


What happens on every push


On every push to the configured branch, Hodiploy:


  1. clones the repository again from scratch, submodules included (a shallow clone, without the history); the content fully replaces the previous deployment's modules
  2. restarts the instance, (re)installing your Python dependencies
  3. automatically updates the already-installed modules whose files have changed


A module pushed for the first time must be installed once through Odoo's Apps menu; its later updates will be automatic. Conversely, removing a module from the repository does not uninstall it from your database: uninstall it from Odoo before removing it from the repository.


Python dependencies: requirements.txt


If your modules need Python libraries, add a requirements.txt file at the root of the repository. It is installed automatically at every start of the instance, in a dedicated Python environment.


Gather all your dependencies in that single file rather than scattering requirements.txt files across subfolders.


Name your modules plainly


The folder name is the module's technical name: unaccented letters, digits and underscores, starting with a letter. my_module works; my-module, My Module or an accented name would be skipped by the automatic update.


Also avoid giving a module the name of a standard Odoo or Odoo Enterprise module: the collision produces behaviour that is hard to diagnose.


What Hodiploy does not read


  • Git LFS is not supported: files tracked by LFS would arrive as text pointers
  • Any Dockerfile, docker-compose.yml or odoo.conf in the repository is ignored: containerisation and Odoo configuration are handled by Hodiploy


Keep the repository light


The deployment clones your repository in seconds as long as it only contains code. Do not store backups, database dumps or large binary files in it: past a few minutes of cloning, the deployment is aborted.


Going further


Updated on: 20/10/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!