Recently I saw a question from a Python fellow, how to deploy Django application without manually SSH to server and run commands. This style is single-server deployment, where you put all components, from the application code, database, to static, media files, in the same server. No Docker involves. With this deployment strategy, we will need some way to deliver new version of our app everytime new code is pushed to the "release" branch of Git repository. Here is a guide.
Why we need automation? Because it is boring to do these things by hand again and again:
- SSH to the server,
cd
to the installation folder. - Run
git pull
. - Run commands to stop your services.