|
|
|
|
|
by wilsonfiifi
1904 days ago
|
|
Dokku will allow you to host multiple applications on subdomains for which you can create CNAMEs in your DNS settings. Dokku is more of a mini self hosted Heroku without a dashboard so you'll lose out on cpanel features like email hosting. But If you're not uncomfortable using docker, you can check out Cloudron [0] which handles email [1] and gives you access to quite a few web apps you can easily install on your server. It supports PHP app deployments [2] out of the box but for Django, you'll have to dig a bit deeper into their docs to learn how to deploy a custom docker based app [3]. [0] https://www.cloudron.io/ [1] https://docs.cloudron.io/email/ [2] https://docs.cloudron.io/apps/lamp/ [3] https://docs.cloudron.io/custom-apps/tutorial/ |
|
For internal stuff we use Django for everything. Host it locally, etc. We even use Django as the front end for industrial automation applications (which imposes interesting challenges, like maintaining state in the database as well as reliable activity logs and more).
If I were to summarize the difference between doing Django for the web vs. PHP for a business it would go something like this:
PHP: Get almost any server. Setup the domain, emails, setup database, upload code. You are up.
For Django you could do this (some of this is dated, just making a point):
https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django...
or this:
https://www.gjlondon.com/uncategorized/the-idiomatic-guide-t...
or this:
http://www.robgolding.com/blog/2011/11/12/django-in-producti...
or this:
https://developer.mozilla.org/en-US/docs/Learn/Server-side/D...
In other words, you are way past the beauty and simplicity you got during local development.
And, of course, for most, if not all, of the above, you still have to deal with setting-up business email. Which means you either get the same VPS you got for the PHP case and point the MX record that way or, spend a bunch of money per email address with something like Gmail. Etc.
Django is fantastic. Somehow, someone needs to figure out how to be able to launch the same type of site you might develop locally to a standard VPS just as easily as what is possible on your local development system. Yes, of course, for more advanced sites you are into separate DB, static, application, etc. servers. That's a different use case. I think what people are saying is that there's a great divide between "runserver" and actually being on a server from there without paying more for specialized deployment services.
Another way to look at this that Wordpress will never be challenged at scale if a better tool like Django isn't easily accessible to developers who are not Linux/server experts. I was running Unix before Linux came out and have used Linux in various forms (including early embedded systems applications) since the beginning. If someone like me recoils at the idea of actually deploying Django in the real world I can't imagine what this might feel like to others who might lack the experience.
In other words, I can do the work. I just think it's unnecessarily complex and not enough effort has been expended duplicating the ease of local development for basic to mid-range Django apps at the production server level.