4 ms·
I've been away from direct work with Python + Django (P/D) for a couple of years. One of my issues with P/D has always been that deployment on anything other t
by robomartin 4y ago
I've been away from direct work with Python + Django (P/D) for a couple of years. One of my issues with P/D has always been that deployment on anything other than one of the specialized services is an absolute pain in the ass.
In the PHP world, you can get a simplest of servers from any host, upload the files and you are up and running. With P/D, well, it's a lot of work.
I have developed this opinion that, while useful, Django's SQLite and runserver approach for getting up and running quickly actually is detrimental. To run a real site you have to break all of that, deal with static content, etc., etc. I could also argue that the default directory structure, while simple, it is also detrimental when moving to production.
In other words, sometimes I feel it would be far better if P/D initial setup was closer to a canonical installation that could be run on any server with something as close as possible to a simple FTP file transfer (just like PHP).
One can always make things more complex (multiple servers, load balancers, etc.). However, I truly believe the P/D ecosystem is seriously missing the point when not delivering a 5-minute install that actually is a basic production-ready install on any server.
Have things changed at all in this regard over the last couple of years?
- hkhanna 4y agoThat's true, and PHP certainly has ease of deployment over Django. I generally deploy Django applications on services like Heroku or Render, but it can get expensive since you can't really re-use instances for multiple applications like you could with a VPS and multiple PHP applications. But, at least to me, ease of deployment is less of a concern once it's going. And since I stick to one hosting provider and only have a handful of applications I maintain, its not something that crosses my mind until I spin up a new Django application which happens only rarely.
- chatmasta 4y agoI often joke that Docker wouldn't exist if it had been easier to deploy Python code, since it was DotCloud who invented Docker as part of solving that problem. I was hoping Vercel would be their spiritual successor, back when they were known as Zeit and allowed running arbitrary containers at the edge, but alas they pivoted to focus only on the JS platform. That said, IMO Next.js is the closest thing to modern day PHP in terms of filesystem-based routing and "write code on a page, render it at the same URL." For Python, we run our services in containers using some custom images, and build the code from a monorepo using a combination of Pants and Poetry. For smaller or more focused projects, I think Google Cloud Run is quite nice, since it supports the Buildpack Spec and is in many ways a successor to Google AppEngine.