I'm somewhat new at git (and linux). I'm part of a small team and tasked with deploying our project to our debian server.
We are still pretty early in the project and thus, do not need an overly complicated deployment solution.
Anyway. Our project is stored on github, which we pull/push from/to. At the moment, when I want something deployed, I pull it on my Windows machine using git pull. I then use this script:
cd src/www
scp -r app public <user>@<server-ip>:/home/www
I enter the password and the files upload.
I then log into the server and restart the service (playframework) play restart --%prod
Can anyone recommend a simple solution that makes the server get the changes from github and automatically restarts the server? I've looked around here on stackoverflow and only found solutions that didn't make a lot of sense to me due to my inexperience with Linux and Git.
One option is to use a deployment library/framework like Capistrano. Once you configure your deployment (called a "recipe"), Capistrano allows you to deploy to one or more targets very easily from the command line. It also provides a nice release structure, allowing you to better manage the copy of your application that is deployed to your targets at any given moment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With