loganyott/vagrant

此包最新版本(0.3.2)没有提供许可证信息。

安装次数: 1,375

依赖项: 0

建议者: 0

安全: 0

星级: 0

关注者: 2

分支: 0

开放问题: 5

语言:Shell

类型:vagrant-config

0.3.2 2015-06-30 23:44 UTC

This package is not auto-updated.

Last update: 2024-09-14 17:32:02 UTC


README

这是一个composer包,用于拉取默认的Vagrant配置。安装后,它将一个Vagrantfile复制到项目的根目录,以便您可以更改特定配置。

入门指南

  1. composer require "loganyott/vagrant"
  2. cp ./vendor/loganyott/vagrant/vagrant.yml ./vagrant.yml
  3. 根据需要修改vagrant.yml
  4. vagrant up

使用Vagrant

要连接到您的vagrant虚拟机,请使用vagrant ssh

在虚拟机内部进行的任何配置更改将一直持续到执行vagrant provisionvagrant destroy

默认值

以下是一份默认配置值的列表,以及更改它们的步骤。

结构

供应商目录

vendor

  1. 将以下内容添加到您的composer.json

    {
    	"config": {
    		"vendor-dir": "DESIRED_VENDOR_DIR"
    	}
    }

### webroot
`/srv/www/`

1. Currently not configurable outside of `vendor`


## Nginx

### Host

`site.local`

1. Open `vagrant.yml`
2. Change

  ```yaml
  :hostname: DESIRED_HOSTNAME
  ```

### Nginx port

`8080`

1. Open `vagrant.yml`
2. Change

  ```yaml
  :network:
  	:forwarded_port:
  		:host: YOUR_DESIRED_PORT
  ```

*Note: Vagrant will try to correct port collisions automatically. Look for a line such as `==> default: Fixed port collision for 80 => 8080. Now on port 2200.` during a `vagrant up`. In this example, I can access my local through `localhost:2200`.*

## mySQL

### user
`root`

1. Currently not congiurable outside of `vendor`

### password
`root`

1. Currently not congiurable outside of `vendor`

### database
`project`

1. Currently not congiurable outside of `vendor`

### port
`3306`

1. Currently not congiurable outside of `vendor`