In python based web apps be it django or flask or any other frameworks. I am wondering what would be the better way to bundle all the dependencies with our as a zip and deploy it in production servers without the need to connect internet from the production machine. Since I am from java background, I am expecting a build(WAR file in case of J2EE apps) with all necessary dependencies.
I've recently started using shiv to package apps for internal deployment. Relies on the proper version of Python being installed on the server.<p>Briefcase is another option. It bundles everything, including Python. I've just started playing with it.<p><a href="https://shiv.readthedocs.io/en/latest/" rel="nofollow">https://shiv.readthedocs.io/en/latest/</a>
<a href="https://beeware.org/project/projects/tools/briefcase/" rel="nofollow">https://beeware.org/project/projects/tools/briefcase/</a>
Lately, I have been using Docker Swarm... build containers on a private deployment machine with all dependencies, and deploy them to production machines in a load-balanced, isolated environment that is fault tolerant.<p>Works nicely and I don’t have to worry about subsequent package updates for other apps breaking existing ones.<p>Cheers!