Is there a set of documentation showing the services and communications i.e. redis, db, gunicorn, supervisor, nginx etc.
I would like to install ERPnext on NixOS and manage upgrades with our own choice of CI/CD but bench is doing a lot of stuff that other things do and it needs internet access. I’d rather not reverse engineer the from source code as I would like to get to the intent of the components and build from that.
There seem to be some other threads around issues with setup and upgrade which might benefit from documentation on the process and components.
If you are interested in this please let me know. I’m considering placing a bounty on this.
“NixOS has a completely declarative approach to configuration management: you write a specification of the desired configuration of your system in NixOS’s modular language, and NixOS takes care of making it happen.” This is at odds with the python and Ansible currently used for state management and setup. Database, web servers, scheduling, process management can be defined as nix expressions. Code management and upgrades can be managed with a variety of CI/CD tools but the steps required to do this all reference bench.
Without a clear description of how frappe handles requests (not the web server), where the state is stored, how the application is configured etc. it would require reading the code. Essentially I’d like better documentation for the things that are specific to frappe and ERPNext but not specific to OS, database, web servers, scheduling, process management etc. unless there is a hard dependency e.g. requires MariaDB version x.y. and wkhtmltopdf with patches from repo github…
The frappe.io link was somewhat helpful for the components but it lacks detail about the interfaces and configuration files.
As for the bounty, I’m thinking I’d keep it high level such as “Support for ERPNext on NixOS”.
I am hearing from many in the Nixos community that the way that erpnext handles packaging and internals makes it a true nightmare to implement in Nixos. Apparently it is a symptom of a problem with how erpnext is organized in terms of installers, dependencies/requirements etc. Some very seasoned nixos developers reported it took them 3 weeks (!!!) to get through packaging this.
So, I going shift to creating a branch of erpnext where I try to sort that out. Given what I have seen so far, this is going to be a large and time consuming project for me. I will be updating here as I make progress. I am not really looking for a bounty on it.
There are mainly 3 component required, python environment, nodejs/socketio environment and nginx to serve static assets reverse proxy to python/gunicorn and socketio.
python environment also starts 3 background workers and schedule process, these are not exposed by nginx