1
3 Comments

Deploying a Django app on Siteground shared hosting

Hi,

I'm exploring using the Django framework to write a web app. I have a super basic proof of concept site that I want to test out deploying before I go too far with it.

I already have a shared hosting plan with Siteground that allows me to host unlimited websites - so this would be my first choice for hosting a production site since I'm paying for it anyway. It looks like this ought to support Django although the docs don't explicitly mention it - but there is mention of python and it seems to have a postgreSQL database option.

Has anyone actually done this (ideally on Siteground but maybe on any shared hosting) and can point me in the right direction? I'm currently in scared-newbie mode and not sure what I should even be poking around with. I can find lots of tutorials about deploying on Heroku, but not much else...

Thanks for any help!

posted to Icon for group Developers
Developers
on May 1, 2021
  1. 1

    I'm currently in scared-newbie mode and not sure what I should even be poking around with

    Based on this comment I would very much recommend Heroku. It for sure one of the easiest and simplest to use. You can host your site for free as you work on building it up. I have all my side projects on Heroku. And there is no real platform lock in so once your app is up and running you can always move to another platform if it makes sense to avoid slightly higher costs. But the time savings for me is worth the extra cost.

    Feel free to DM me if you do go the Heroku route and need any help getting it setup.

  2. 1

    I had a quick look at Siteground and their Cloud Hosting package is probably what you need to host a Django app but at £60 a month its very expensive and you will likely have to set it all up yourself (take it from me that setting up a Django app with nginx, SSL, a database with working static assets can be fiddly).

    I would also suggest something like Heroku, Pythonanywhere, render.com or Digitalocean's managed App platform if you just want to get something out fast.

  3. 1

    Hey,

    Deploying to Heroku would likely be much simpler if you want to stay focused on building the web app itself & learning more about Django.

    However, if you want to host on Siteground, the basic premise would be to get Django running through a WSGI or ASGI server, which is then fronted by Apache or NGINX. My preferred setup, in this case, would be using (waitress)[https://docs.pylonsproject.org/projects/waitress/en/latest/] as a WSGI server then use NGINX to front the server. You would then need to configure NGINX to manage SSL termination, possibly configure static and media files and other HTTP headers.

    Let me know if you have any further questions and I can dig out more details.

Trending on Indie Hackers
I'm a lawyer who launched an AI contract tool on Product Hunt today — here's what building it as a non-technical founder actually felt like User Avatar 140 comments “This contract looked normal - but could cost millions” User Avatar 54 comments 👉 The most expensive contract mistakes don’t feel risky User Avatar 41 comments The indie maker's dilemma: 2 months in, 700 downloads, and I'm stuck User Avatar 39 comments I spent weeks building a food decision tool instead of something useful User Avatar 28 comments A simple way to keep AI automations from making bad decisions User Avatar 24 comments