loganyott / vagrant
此包最新版本(0.3.2)没有提供许可证信息。
0.3.2
2015-06-30 23:44 UTC
Requires
This package is not auto-updated.
Last update: 2024-09-14 17:32:02 UTC
README
这是一个composer包,用于拉取默认的Vagrant配置。安装后,它将一个Vagrantfile
复制到项目的根目录,以便您可以更改特定配置。
入门指南
composer require "loganyott/vagrant"
cp ./vendor/loganyott/vagrant/vagrant.yml ./vagrant.yml
- 根据需要修改
vagrant.yml
vagrant up
使用Vagrant
要连接到您的vagrant虚拟机,请使用vagrant ssh
。
在虚拟机内部进行的任何配置更改将一直持续到执行vagrant provision
或vagrant destroy
。
默认值
以下是一份默认配置值的列表,以及更改它们的步骤。
结构
供应商目录
vendor
-
将以下内容添加到您的
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`