Settings

Theme

A better way to deploy Python web apps to production with all dependencies

3 points by rishikeerthi 5 years ago · 2 comments · 1 min read


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 5 years ago

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://beeware.org/project/projects/tools/briefcase/

rwdim 5 years ago

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!

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection