Building and packaging ERPNext code for production

Hi everyone,

I have a simple inquiry related to the production deployment of ERPNext.

Can we build and then package and then deploy ERPNext on another machine?

Just like we can build a .NET application for production and deploy it at a production server the packaged production build does not expose the application code, it is just a set of files that stay on the webserver and run the application.

On the other hand, we see we can clone the ERPNext code on Ubuntu, we make some changes to it and we turn that instance to production mode, but the code is there and every time we have to go to that machine and edit the code.

How can we develop ERPNext on the development machines and then take the deployment on the production machines?

Please guide me in this area, I have been working on ERPNext for quite some time but I have limited knowledge.

Thank you in advance.