Setting up Repo on Amazon EC2 for Git Push
Was trying to setup an instance on Amazon which I can do a git push to update the /var/www/html folder. Decided to share the steps here, so that other beginners like me can benefit too! Prerequisites Setting up Amazone Instance This article basically covers all the steps need to fire-up an instance and set the Security Group and SSH . Install LAMP + phpMyAdmin Install LAMP stack is easy, but install phpMyAdmin is slightly tricky. Luckily this github gist explained the steps very well. The only missing part that you might want to take note is the part to change the user of the html directory. sudo chown -R ec2-user /var/www/html/ Setting up Git Setting Up Git Repo to work with /var/www/html folder At first I tried this solution from stackoverflow post . The method is: Copying .git folder to /var/www/html/ folder. Then use a post-update script to update the git repo. The idea looks logical, and easy to understand, bu...