I am new to Django six months ago and I learned how to deploy the Django projects to EC2 instances.

Basically 1st time when the Django project is deployed to EC2, the instance will be configured with httpd.conf, wsgi, change permissions on files and folders and other stuff and the project will be cloned to the EC2 instance and server is restarted.

My question is: how do they do future deployments? They in this context is anyone who deploys Django on EC2 instances.

Do they login to EC2 instances and manually clone the repository from VCS site and restart the server?

Do they have any other automated mechanism to pull the code, ensure permissions and restarting the apache server etc.

How is it done basically every time they go for a release?

1 Answer 1


Probably, you want need to go through something like Ansible first. Nothing is done manually these days, not even launching of EC2 instances or creating a VPC is manual and if it is, it needs to be changed immediately. You may also go through Terraform. You also need to understand CI/CD flow. So when any changes are pushed to git, a CI mechanism will execute which can include build, compile, unit test execution, integration test execution, code coverage reports etc which are all automated. Deployment can either be automated if CI is successful or on click of a button. Ansible can take care of the configuration changes which needs to be deployed including the application code changes. In fact, if you are in AWS, why don't you go for docker and deploy app in Docker using benefits of Amazon ECS. A Terraform code can do zero downtime deployments for you. This is not specific to Django. It is used for any tech stack.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.