TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How do you keep your dev environment(s) portable?

2 点作者 relaunched将近 11 年前
Recently, I had to move machines...and it was a nightmare. Moving my applications, dependencies, config files, plugins, etc.; it is insane. I&#x27;m still finding libraries that I need to replace to get things to move.<p>How do you all keep everything organized and portable? What are some easy ways to stay organized when moving from machine to machine?

2 条评论

moron4hire将近 11 年前
This is a big part of why I insist on packing library dependencies in version control with my projects that use them. I&#x27;ve found that it&#x27;s better to have a known good state than it is to be kept up to date with the latest versions of libraries automatically. It&#x27;s not that hard to upgrade an existing library. I personally find it harder to find a library at all.<p>I keep a separate hard drive for project stuffs. It&#x27;s not just for source code or image files, I also install the software I use to work there. Tools, IDEs, libraries, content packs, documentation, anything necessary for work, goes on that hard drive.<p>That way, in the case of a full OS reinstall, I at least have the program installation directories as a TODO list.<p>Also, all of my code is in Github somewhere. I don&#x27;t have &quot;my HDD only&quot; code anymore. I have one project called &quot;snippets&quot; where every tinkering starts life, eventually to be carved off into its own repository if I like it and I spend significant time on it.<p>I wish I had something like this for my photos. I was using Dropbox for several years, then Google Drive because they offered a lot more space for a lot less money. But I&#x27;ve found that they are only good at restoring small changes. Completely restoring a system burns a lot of bandwidth, takes forever, and I ran into some nasty merge conflicts that destroyed some of my data. I&#x27;ve had both destroy so much data on so many occasions that I just don&#x27;t consider them to be backup services anymore, they are simple file publishing services.<p>How do you backup 200GB of images without having to become a sysadmin in your own home? I just want to shoot photos and write code.
mousetree将近 11 年前
I typically use Vagrant to create virtual machines dedicated to a specific dev environment. The Vagrant VM is usually provisioned by using Ansible.<p>When moving machines I just re-run &#x27;vagrant up&#x27; which will create a new Ubuntu VM and install all the software I need.<p>Here&#x27;s an example of one of my VMs using Ansible: <a href="https://github.com/RealImpactAnalytics/vagrant-dev" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;RealImpactAnalytics&#x2F;vagrant-dev</a>