无业游民,似乎是一个缓慢的发展过程 [英] Vagrant, Seems like a slow developing process

查看:71
本文介绍了无业游民,似乎是一个缓慢的发展过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定即时通讯是否正确理解了流浪者,但就我所知,它就像是在计算机上的VM中运行的服务器一样,由于本地设置与本地主机略有不同,因此您可以使用它而不是localhost来检查其是否正常工作您的服务器.但是,这是检查更新,从本地PC进行git push,然后git拉动无用的VM,然后在本地PC上加载网站以查看更改的最快方法,与之相比,一段时间后看来这将是一个痛苦的过程本地主机CTRL + S f5 localhost网站.

Im not sure if im understanding vagrant correctly but to my understanding its like a server running in a VM on your computer, which you use instead of your localhost to check to see if stuff is working because your local setup is slightly different to your servers. However is the quickest way to check updates, to git push from your local pc, then git pull on your vagrant VM then load up the website on your local pc to see changes, seems like it would become a painful process after a while compared to the local hosts CTRL+S f5 localhost website.

推荐答案

我将尝试给出一些提示:

I'll try to give a few hints:

它就像在您计算机上的VM中运行的服务器

its like a server running in a VM on your computer

Vagrant不是服务器,而是管理计算机上VM的工具,它可以帮助您为您启动,配置,停止或销毁VM.它抽象化了您正在使用的提供程序(virtualbox,vmware,云提供程序或其他),并使其成为所有团队成员的单一工作流程.

Vagrant is not a server, its a tool to manage the VMs on your computer, it helps you start, provision, stop or destroy the vm for you. It abstracts the provider you're using (virtualbox, vmware, cloud provider or others) and makes it a single workflow for all your team members.

但是,最快的方法是检查更新,从您的git push 本地计算机,然后git拉到您的流浪虚拟机,然后在上加载网站 您的本地计算机以查看更改

However is the quickest way to check updates, to git push from your local pc, then git pull on your vagrant VM then load up the website on your local pc to see changes

不知道您在做什么,但很可能是同步文件夹应该可以帮助您避免这样做.我已经在此处说明了如何使用同步文件夹

Not sure what you're working on but most likely, sync folder should help you avoid doing that. I already explain here how you can work with sync folder

基本上,当您使用同步文件夹时,从主机修改文件时,将在vm上修改同一文件,因此您不需要所有的git东西.变化不是立即发生的,但大多数人都能适应.

Basically, when you use sync folder, when you modify a file from your host, the same file will be modified on the vm, so you do not need all the git things. Changes are not immediate but most people can accommodate.

例如,您可以添加

config.vm.synced_folder "/Users/fhenri/project/examples/vagrant/ssh/www", "/var/www"

这会将我的本地文件夹/Users/fhenri/project/examples/vagrant/ssh/www与vm文件夹/var/www

This will map my local folder /Users/fhenri/project/examples/vagrant/ssh/www with vm folder /var/www

无业游民,似乎是一个缓慢的发展过程

Vagrant, Seems like a slow developing process

这可能是对的,并且有一些博客(目前不检索).那么有什么解决方案呢?

This might be a true and there are a few blogs (do not retrieve them at the moment) that deal with that. so what are the solutions ?

根据您尝试使用无业游民复制的基础结构,但是如果您是单个开发人员,则可以检查 docker ,如果您对docker不满意,vagrant可以真正为您提供支持,您可以将 docker声明为流浪者提供者,再次有一些博客文章以某种基准进行了处理,如果您为流浪者的表现而挣扎,那么您真的可以从中受益.

Depending the infrastructure you try to replicate using vagrant, but if you're a single developper you can check docker, if you're not confortable with docker, vagrant can really support you there and you can declare docker as vagrant provider, again there are a few blog post that deal with that with some benchmark, you can really benefit if you struggle with vagrant performance.

我希望能有所帮助

这篇关于无业游民,似乎是一个缓慢的发展过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆