Automatic GIT deployment via FTP, SFTP and SSH
Submitted by benjy on Thursday, June 21, 2012 - 07:35.
I've never really been happy with deploying websites via FTP clients such as Filezilla for obvious reasons.
Disadvantages of using an FTP client for deployment
- Its quite a primitive workflow manually browsing through the filesystem using Filezilla and individually uploading one file at a time.
- Alternatively re-uploading everything can be slow and cumbersome.
- It's not that easy to reverse changes on the web server
- You don't automatically know what revision of the code has been deployed to the server.
Here comes Springloops. Springloops is a remote repository and deployment server. Well that's mainly what I use it for, they also offer a number of project management and wiki tools.
Advantages of using Springloops for deployment
- One click deployment. Once you have pushed all your code out through your VCS to Springloops deployment is as easy as one click.
- Revert deployments. Need to undo that deployment and revert to a previous commit? No problems that's one click too.
- Fast. Worried about it being slow? Springloops only deploys changes to files.
- Staged commits. Already have a code base on the live server? Not a problem, simply specify the commit already on the server and Springloops will deploy all changes since that commit.
- Notifications. Need to know if the deployment failed? Easy create a notification for different events such as failed deployments.
If you have any questions regarding Springloops please feel free to ask them in the comments and I'll answer them where I can. You could also use this link and get a free 28 day trial.
Comments
I've also written a little PHP script that that does deployments through FTP locally from your computer. It si called PHPloy and is tightly-coupled with Git to determine what which files where edited/added/deleted and uploads them accordingly. You put your FTP details in a deploy.ini file and run just a command to deploy:
phploy
You can also deploy to multiple servers at once. And if you have multiple servers configured, you can select to deploy to one of them like this:
phploy --server staging
There is more that can be done - check it out on Github: https://github.com/banago/PHPloy
Add new comment