Home Download Buy Blog Forum Support

Tip on webserver/CMS workflow (SFTP/git)

Tip on webserver/CMS workflow (SFTP/git)

Postby flips on Thu Oct 25, 2012 1:00 pm

I'm developing some websites, using serverside blog and CMS solutions.
I love to keep working on planes and such, so as of now, I've been running copies of these sites locally on my laptop.
I've checked all the files into GIT, and when I do changes to the files, I commit and push them to the test server.
If I also make changes to the CMS/blog through the web interface, I need to do a mysqldump locally and restore on the server.
(So far I haven't tried the git package functionality in Sublime. I'm a little new to git, so I'm getting to know it on the command line first.)

This setup works, but I'm playing with the idea of a file sync setup that lets me edit my files locally, but as soon as I'm online, it syncs my files to the server(s), sort of like how Dropbox works (transparent reconnect and background syncing).
If I still have to trigger sync manually, typing "git push" is just as simple ...

Any recommendations on a better setup?
I've been reading some on various SFTP clients (for Mac), but many of them seems to get trouble if I'm offline. I just tried in Transmit 4 to mount the volume as a finder volume. If I then try to save while turning wifi off, I get I/O error ...

Maybe Sublime Text 2 has some packages that I should check out? (I guess the editor can trigger Transmit or other apps, but what happens if I'm offline when I do Cmd+S?)

I guess it should be possible to make some script that detect network availability, that is triggered by changes to a folder (I think launchd can detect those), but I'm not sure I'm able to make that a robust/fail tolerant solution ... What say you? :)
flips 8-)
Posts: 3
Joined: Fri Aug 17, 2012 5:22 pm

Re: Tip on webserver/CMS workflow (SFTP/git)

Postby iamntz on Thu Oct 25, 2012 1:30 pm

You could try sftp plugin. Right click on the folder (in the sidebar) and chose: sync with remote. (also have a lot of other options, but this is what are you looking for).
Posts: 919
Joined: Fri Apr 29, 2011 8:52 am
Location: Romania

Re: Tip on webserver/CMS workflow (SFTP/git)

Postby sfuchs on Fri Oct 26, 2012 9:06 am

Personaly i dosent use FTP Live Editing, i switched to a Git Workflow. Its not so fast but more secure.

I use this script http://www.stephenradford.me/blog/tutor ... vice-hooks. Upload the File on the FTP, than connect this script with a Service Hook from Bitbucket. Every time when i push my modifications on my repository, Bitbucket deploys this automatic on my FTP.
Posts: 2
Joined: Fri Oct 26, 2012 8:57 am

Re: Tip on webserver/CMS workflow (SFTP/git)

Postby flips on Sat Oct 27, 2012 5:04 pm

I am using git, but a challenge is handling changes on the server (in the CMS), getting those into git.
So I was thinking I could work through sftp or something towards a lab server, where everything in the Document Root is in git. Then working toward that through SFTP, and pushing from there unto the prod server.
(Main benefit: Saving myself for quite a few "mysqldump > file", "scp file remote-server:/path" and "ssh remote-server mysql <file" ...)

With the SFTP package, will I have to trigger folder sync manually, or does it try whenever a network connection is available?
(Would be neat with Dropbox-like sync)
flips 8-)
Posts: 3
Joined: Fri Aug 17, 2012 5:22 pm

Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 14 guests