So I am beginner Django Developer and have been learning by developing local apps. I am looking to finally deploy something so people can use it. I have been looking around at various hosting providers and I am wondering what it's like using Digital Ocean for Django hosting. Specifically what exactly is involved/required with managing a Django app on Digital Ocean. Hostgator, which is another host I've been looking at, does not offer any "one-click" install for stuff like Nginx or anything else which I noticed Digital Ocean does have, so I would have to install that that as well as anything else I'd need myself. I guess my question is after that one click install what is involved with managing a Django app on Digital Ocean? Do I have to learn how to do a ton of other stuff regarding managing a server and dealing with Nginx (I would have to do that on HostGator) or does that One-click install for Django handle all that? Also other than Django, are there any skills that I have to learn in order to be able to do this?
Digital Ocean is more than a hosting service, it's a development platform. Digital Ocean works around the element of "droplets", where each droplet is a virtual machine typically running a UNIX system. Basically if you are looking for a service where you can both host a website and do some development, Digital Ocean may be the way to go, but it is not free. But yes, you would have to configure everything yourself with regards to setting-up Django, proxies, and other network-related tasks.
If you are looking for an easier, alternative solution, you might want to take a look at Django on Heroku.
As far as I know, there are no one-click solutions for Django. There is an official tutorial, though, which is where I would start, along with a quick read in the Django docs.
My experience hosting small Django apps on DO has generally been good. DO is very stable nowadays with no noticeable downtime (unless you must guarantee HA to your users, which I don't).
I have been using Digital Ocean/DO for my Django deployment last 6 months and have a great experience.
I use Django On Click Django 1.8.7 in Ubuntu 16.04 Image for all my website development.
Do provides extensive tutorials/documentations and very developer/tinker friendly. I was able to config my Do box Nginx to host 4 different websites on one single box and even manage to run a Ethereum node on it.
I wrote this tutorial on How to Deploy Multiple Websites on 1 single DO Droplets - Tutorial Link
Related
So far, the only websites I've put in a hosted domain were with PHP. But since I work with Django I wonder if there would be any "barrier" or trouble when it comes about hosting a project, since Linux and IOS have Python installed by default but Windows not. Also it would be necessary to install tools such as Django itself, pillow, mysqlclient, etc...
I just want to know any possible barrier before going ahead. Thanks!
Everything depends on the server, if you have the necessary permissions to install and configure everything, you will not have any problem. How can be gunicorn, supervisor, nginx, etc.
For example services that you will not have any problem can be Amazon EC2, digitalocean, or any similar provider.
When I started with Django about 4 years ago I didn't know anything about servers, nginx and very little about databases but I found Djangoeurope on which I put my first websites.
They have managed databases (PostgreSQL and MySQL), one-click Django installs, reasonable prices and a very helpful staff.
I've since transitioned to using Docker on GCP, but for a beginner I can't recommend them enough: you can just concentrate on your Django code and you don't have to learn everything else at the same time.
A bit of background
I work for a little company as Django developer. The previous developer left the company and I am the only developer (that is the reason they were looking for a Django developer). The company has a simple web application that needs to be mantained and scaled. It seems that the company is getting sales and incomes are increasing. There is a possibility to hire another developer in the short or mid-term. Right now I am analizing possible improvements. This is my first professional job as Django developer, but I achieved to deploy some little personal projects in the past. As you can imagine I am not an expert at all.
The issue
We use a Ubuntu VPS for development, using Django's integrated web server. And another Ubuntu VPS for production, using Nginx+Gunicorn. We use git for version control. The only user we use (for everything) in both VPS is root. I don't work locally in my computer, but connected via ssh to the servers. These are my insights about the structure:
Use of root is unsafe. No doubt about it and we should change this.
What if another developer is hired? Could we work together in the development server?
The question
As the title says, I want to know which would be the perfect working structure for a developers team. After googling a few hours my approach would be something like this:
Production server.
Testing server (replicating as much as possible the production server).
Development environment. Every developer should work and test their code locally in their computers before testing it in the Testing server.
Use of Git for version control.
Use of non-root users for both testing and production servers.
This is just my point of view and I haven't even tried it. I would appreciate you to share your knowledge and experiences.
Thanks in advance!
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
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.
I run a small VPS with 512M memory of memory that currently hosts 3 very low traffic PHP sites and a personal email account.
I have been teaching myself Django over the last few weeks and am starting to think about deploying a project.
There seem to be a very large number of methods for deploying a Django site. Given the limited resources I have available, what would be the most appropriate option?
Will the VPS be suitable to host both python and PHP sites or would it be worth getting a separate server?
Any advice appreciated.
Thanks.
There aren't really a great number of ways to do it. In fact, there's the recommended way - via Apache/mod_wsgi - and all the other ways. The recommended way is fully documented here.
For a low-traffic site, you should have no trouble fitting it in your 512MB VPS along with your PHP sites.
Django has documentation describing possible server arrangements. For light weight, yet very robust set up, I'd recommend Nginx setup. It's much lighter than Apache.
I run several low-traffic Django sites on a 256 VPS without problem. I have Nginx setup as a reverse proxy and to serve static files (javascript, CSS, images) and Apache using mod_wsgi for serving Django as described in the documentation.
Running PHP sites as well may add a little overhead, but, if you're talking about low-traffic "fun" sites then you should be fine.
I am about to choose hosting provider for my Django project. I took a look on a linode
and it looks very promissing. It looks like very elastic solution but in my case this might be a disadvnatage since I'm not so experienced in servers configuration (alternative provider for me has great tools to quickly do the job, but linode has more competitive power/price ratio).
Do you have some experience in linode configuration for Django projects?
EDIT:
To be more precise: I am not so affraid about django packages installation but more about application server/database server/security/all that stuff configuration.
Whether you stick to the Django packages that your distribution provides (Ubuntu seems to be best) or use easy_install, Django is pretty easy to get going. The host that you're looking at, Linode, has Django setup guides for a variety of distributions. I recommend mod_wsgi with Ubuntu 10.04 from that list.
I've personally used Django on my Linode, and it works fine. Well, in fact. For your intents and purposes you can think of a Linode as a dedicated server, and it will behave entirely the same for Django.