TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Using BitTorrent Sync to live-edit or deploy websites

9 pointsby rvavruchalmost 11 years ago

4 comments

euankalmost 11 years ago
This is a bad idea for several reasons.<p>The first issue is security. Loads of text editors create temporary files (.swp, .php~, etc) in the same directory as the file you&#x27;re editing. These can render as text instead of going through php, thus revealing things like database secrets and such. Now, this problem won&#x27;t always occur and can be configured around.<p>However, perhaps the bigger problem is that this is simply a bad workflow when a better one exists. For &quot;live editing&quot;, run a local webserver. Don&#x27;t expose your playing around to the world, potentially breaking your site for others. Heck, if it&#x27;s a static site, just run &quot;python -m SimpleHTTPServer&quot; if you like. Second, for deploying, you should have a better process than &quot;sync this directory&quot;. Specifically, you should have git hooks that handle deployment if you want don&#x27;t-think-about-it instant deployment. Preferably you have CI that deploys after it passes a few tests. Using git also has other benefits like letting you have commit messages, easy rollbacks, different branches (which you can auto-deploy to test &#x2F; dev &#x2F; etc).<p>Basically, the problem with using Dropbox or BTSync to edit websites is that you rarely want to throw partial changes to the world, and file sync programs like to sync as often as possible. It&#x27;s a cool idea, but those sync programs simply don&#x27;t replace proper version control and CI.<p>I&#x27;d even prefer rsync if you&#x27;re not using version control simply so you can control <i>when</i> it syncs and setup complex excludes &#x2F; shell scripts to run around it. You could easily have a script that runs a minimizer and then rsyncs the output while having rsync exclude any potentially accidental files. You can&#x27;t do that nearly as easily with the workflow the author is talking about.
评论 #7901604 未加载
评论 #7901492 未加载
评论 #7901047 未加载
desireco42almost 11 years ago
So I am big fan of BTSync, it works really well and displaced used of DropBox mostly. I use DB only with apps on ipad that have that integration.<p>I think both use dropbox or btsync for this is a little weird. I wouldn&#x27;t do it. It is not hard to publish sites.
inthewoodsalmost 11 years ago
We&#x27;re looking at deploying a static site generator - but one issue I&#x27;ve run into is how to allow our content folks to use the system. Ideally, the files would be stored in Github and then, on commit, the result are compiled and pushed to a staging server. We&#x27;ve been looking at Jenkins for managing the process, but it seems a bit heavy handed - anybody have any other suggestions?
smurfpandeyalmost 11 years ago
I was using it to deploy my web apps, and keep my 2 servers in sync. But lately i am facing issues with it. Once in a while my bittorrent sync on server shows No device connected, even if my local machine is online. Thankfully i am using ec2, so spinning up a new instance from few days old AMI is easy and usually btsync starts to work again on the new server. Now looking into different solutions.
评论 #7900827 未加载