Best ways to Deploy Django REST API on CentOS

Suri Nuthalapati on May 14, 2019

What are the best way to Serve Django REST API(Only API) on Below stack:

  • AWS EC2 (not looking for elasticbeanstalk as of now)
  • CentOS/RHEL 7
  • any other things needed for deployment
markdown guide
 

I always choose Linode basic server (5$ per month) comes with super configuration for initial server setup. If you want some docs to refer then DigitalOcean have tons of tutorials about how to run django in Ubuntu with awesome configuration.

Also amazon has the lightsail which is similar to Linode and DigitalOcean go checkout.

 

is Linode a managed infrastructure to deploy? I was more looking towards deploying it on place CentOS 7 without using managed services.

 

Linode is a hosting company you can create private server as per your need. They also have load balancer in case if you want scaling.

You have mentioned not choosing elastic so I thought you are not going to choose paas.

If you want paas approach then go with Google app engine flexible and you can have centos in docker best for scaling.

 
 

I have started using uWSGI and NGINX with sockets. It has been better so far and was also easy to deploy. I have done https with Let's Encrypt on NGINX for the API.

followed below for uWSGI and NGINX:
How To Serve Django Applications with uWSGI and Nginx on CentOS 7

followed below for ssl on NGINX:
How To Secure Nginx with Let's Encrypt on CentOS 7

 

If your not thinking of uWSGI, you can think of using Apache.

code of conduct - report abuse