Ever wondered how to create invoices without relying on paid services or abusing Microsoft Excel? Dolibarr is a software that provides functionality to create invoices and offers, as well as to manage corresponding resources such as customers, partners, products, service, projects, payments, etc. It is free and open-source. After setup, You can access your own Dolibarr instance via web browser. Officially, Dolibarr is referred as an ERP (Enterprise Resource Planning) and CRM (Customer Relationship Management) system. From my experience, it is overall the best choice among open-source systems. Other candidates are Odoo, Metafresh, Kivitendo, and Apache OFBiz.
This article shows how to set up Dolibarr in your Kubernetes cluster. This way you can benefit from Kubernetes advantages such as high availability and automatic volume backups (if enabled). Although, this might be overkill for some uses cases. As a bonus, a reference to a simple setup using Docker compose is also included.
Try out a Dolibarr demo at https://demo.dolibarr.org
- Kubernetes cluster is set up and ready
- Subdomain e.g.
dolibarr.example.compoints to your Kubernetes cluster
- Kubernetes cluster has a
lets-encryptset up and ready (you can adjust this setup if named differently)
To deploy Dolibarr on your Kubernetes cluster, multiple Kubernetes objects are needed. The GitHub repository https://github.com/soerenmetje/kubernetes-dolibarr contains Kubernetes template files (
*.yaml) and detailed setup instructions. In summary, following steps are necessary:
- Create a new namespace
- Modify the template files
- Apply the template files to create the Kubernetes objects
- Check if Dolibarr instance is reachable
If you want to restrict the access to certain IPs or IP ranges, further configuration steps are included in the repository. Additionally, the upgrading process and advanced configuration of Dolibarr, as well as known issues and troubleshooting are covered.
In the end, we will end up with following Kubernetes objects:
webserver pod, Tuxgasys' Dolibarr Docker image is used. Luckily, this image handles the installation process of Dolibarr automatically on the first start. The
db pod runs a mariadb container. The persistent volumes
db-data ensure that configurations, generated PDF files, and the database content is persistently stored. The
dolibarr-ingress ingress allows accessing Dolibarr via https using a user-defined subdomain.