Search code examples
djangoproduction

What are the steps to deploy django project that warks localy to production


I am sorry for asking such a wide question. But i have built website with django that works locally and now i need to deploy it in production. I wanted to try to do it with first with free hosting like Heroku but it caused me with problems with my postgresql, so i decided to to post it in production and spent month for final testing in "real world". Can someone give me just steps that will lead me to that goal. this is my first website and i am really confused with the variety of options that i can use to do it. I found some articles but they were outdated mostly and most of them proposed different solutions that confused me very badly. Would really appreciate just a simple list of steps for deployment, like which hosting to use for starting, how will it work with local domain if i get it country in Central Asia. Will that cause my website work slower or not? Will be grateful for anyone's response and suggestion, cause this deployment process confused me so badly, that i can't solve it without help from experienced programmer


Solution

  • Deploying django app in production on your local system is similar to deploying it on VPS

    You can use this link by Django project or this link by digital ocean to deploy your dango app on your local system. I would suggest you to use digital ocean link.

    You can use this link by heroku devcenter or use this link by Marina Mele to deploy it on heroku

    If you are primarily looking to test the app, then pythonanywhere is a good option for you. With its free account it provides you 500mb of disk usage, a domain name like "yourapp.pythonanywhere.com". If your app has more requirements, then you can check out their paid plans.

    How will it work with local domain if i get it country in Central Asia. Will that cause my website work slower or not?

    The response of your website does not depend on the domain name you buy, it is just to route website users to your website using easy to use/remember address. The response of your website depends more on the performance of VPS or whatever that servers your webapp.

    This is my first website and i am really confused with the variety of options that i can use to do it.

    You have many cost efficient options like using free tier of Amazon Web Services. But as you have mentioned that this is your first website, you may find it difficult to use it, since aws is largest provider of Platform as a Service, and has lots of things in store to offer.

    At this stage you may find using Digital Ocean very easy. In my experience, I have found that digital ocean is more user friendly than AWS.