<p>Probably, you want need to go through something like <a href="https://www.ansible.com/" rel="nofollow noreferrer">Ansible</a> 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 <a href="https://www.terraform.io/" rel="nofollow noreferrer">Terraform</a>. 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.</p>

CC BY-SA 4.0
2019-01-11T06:36:52.463Z
2019-01-11T06:36:52.463Z
deosha
<p>I am new to Django six months ago and I learned how to deploy the Django projects to EC2 instances. </p>

<p>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.</p>

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

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

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

<p>How is it done basically every time they go for a release?</p>

<amazon-web-services><deployment><amazon-ec2><continuous-deployment><python>
How do Django deployments happen on Servers?
user10849817
# How do Django deployments happen on Servers?

(Asked by: username_0 on 2019-01-08)

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?

**Tags:** amazon-web-services, deployment, amazon-ec2, continuous-deployment, python


---

## 1 answers

### Answer by username_1 on 2019-01-11. Score: 1

Probably, you want need to go through something like [Ansible](https://www.ansible.com/) 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](https://www.terraform.io/). 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.


---

