DevOps is all about shipping code to a running environment. It got a lot of benefits but the major one is to have consistence environment and stop (it works in my machine excuse).
and as I worked with Odoo for a long period of time I took it as an example to create a simple way to backage developer's code as a container.
disclaimer:
The pipeline created here is not meant to be used in production it's only for simplifying the idea of Devops for Odoo code base.
The goal:
To create a docker image with the latest changes from git.
Tools:
1.Github.
2.Docker.
3.Github actions.
- The repo structure is:
- Dockerfile
- extra-addons
- addon1
- addon2
- addon..
- …….
- odoo.conf
- requirements.txt
- .github
- workflows
- docker-image.yml
The requirements.txt is only for python modules
As in odoo-devops.
The github action will generate an image with the latest and an image with a hash tag from git.
Like dockermanfirst/odoo-14:latest, dockermanfirst/odoo-14:main-228a04c, you can deploy it on any docker host.
What this structure will guarantee:
Consistency of deployment between environments.
Standard way to deploy the odoo version.
Top comments (0)