Skip to content

Commit 58d5914

Browse files
committed
Adding details regarding after.sh provisioning script
1 parent 8d491b4 commit 58d5914

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

Installing-Laravel.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,16 @@ See [full list of Vagrant plugins](https://github.com/mitchellh/vagrant/wiki/Ava
214214
**Other**
215215
216216
1. You may also like to change the memory value to 1024 (or less) if your host machine is light on memory.
217-
2. You can optionally specify the "smb" type on your folder, if you want to use the SMB method for vagrant shared folders.
218-
219-
If you do this, you'll have to specify the Windows account vagrant will use to connect when you bring the VM up. You'll also need to start vagrant as a Windows account which is in the local Admin group.
217+
218+
2. You can optionally add additional databases, just by adding to the list under `databases:`.
219+
220+
If you want to create additional users for database access, this is done by adding the required commands to the `after.sh` file in `%userprofile%\.homestead\`:
221+
222+
```
223+
mysql -uhomestead -psecret db2 -e "
224+
GRANT ALL PRIVILEGES ON db2.* TO db2_usr@localhost IDENTIFIED BY 'akjshdf7767df';
225+
FLUSH PRIVILEGES;"
226+
```
220227
221228
3. To see the full list of settings, check out **scripts\homestead.rb**. Most of the settings in here can be overwritten by values in the yaml file, but the default port mappings are hard coded.
222229
@@ -234,21 +241,21 @@ See [full list of Vagrant plugins](https://github.com/mitchellh/vagrant/wiki/Ava
234241
authorize: ~/.ssh/id_rsa.pub
235242
236243
keys:
237-
+ ~/.ssh/id_rsa
244+
- ~/.ssh/id_rsa
238245
239246
folders:
240-
+ map: C:/Users/Joe/dev/laravel
247+
- map: C:/Users/Joe/dev/laravel
241248
to: /home/vagrant/projects
242249
243250
sites:
244-
+ map: laravel-api.phplocal.dev
251+
- map: laravel-api.phplocal.dev
245252
to: /home/vagrant/projects/laravel-api/public
246253
247254
databases:
248-
+ homestead
255+
- homestead
249256
250257
variables:
251-
+ key: APP_ENV
258+
- key: APP_ENV
252259
value: local
253260
254261
# blackfire:
@@ -281,7 +288,7 @@ See [full list of Vagrant plugins](https://github.com/mitchellh/vagrant/wiki/Ava
281288
282289
7. **Optional:** if you don't want to bother using your own SSH key, you can comment out the key deployment part in the `homestead.rb` file found in the scripts/ directory. If you do this, vagrant will detect the insecure key during provisioning and replace it with a new key pair. `vagrant ssh` will automatically use this pair. This should be an OK and easier option if you are a solo developer.
283290
284-
Comment out these lines (from line 72 in the current version of this file):
291+
Comment out these lines (from line 72 in the [current version](https://github.com/laravel/homestead/blob/351aebd8bdaf5bb87d76018228b3427b56a7434d/scripts/homestead.rb#L72) of this file):
285292
286293
```
287294
# Configure The Public Key For SSH Access

0 commit comments

Comments
 (0)