
A better way to deploy Python web apps to production with all dependencies - rishikeerthi
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.
======
rgacote
I've recently started using shiv to package apps for internal deployment.
Relies on the proper version of Python being installed on the server.

Briefcase is another option. It bundles everything, including Python. I've
just started playing with it.

[https://shiv.readthedocs.io/en/latest/](https://shiv.readthedocs.io/en/latest/)
[https://beeware.org/project/projects/tools/briefcase/](https://beeware.org/project/projects/tools/briefcase/)

------
rwdim
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.

Works nicely and I don’t have to worry about subsequent package updates for
other apps breaking existing ones.

Cheers!

