Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to push your updated changes to an ec2 instance with django

I have followed the tutorial below and successfully deployed my django app to AWS on ec2.

my configuration is Ubuntu,nginx, gunicorn and supervisor

https://dev.to/subhamuralikrishna/deploying-django-application-to-aws-ec2-instance-2a81

(I have not connected my EC2 to RDS yet)

Now that I have made some changes to my django app and pushed the changes to github, How do I update the changes to my Ec2 instance?

like image 792
cu__007 Avatar asked Sep 07 '25 09:09

cu__007


1 Answers

You need to ssh into your EC2 instance and run git pull so that your working tree in your EC2 is up-to-date with what's on github.

Then, you need to restart your server so that your changes are reflected on the server. For EC2 instances that are served using apache, this can be done by running sudo service apache2 restart.

like image 66
ketcham Avatar answered Sep 10 '25 04:09

ketcham