File tree 5 files changed +75
-0
lines changed
5 files changed +75
-0
lines changed Original file line number Diff line number Diff line change 9
9
/tags
10
10
.env
11
11
.idea
12
+ .vagrant
12
13
composer.lock
Original file line number Diff line number Diff line change
1
+ [submodule "homestead "]
2
+ path = homestead
3
+ url = https://github.com/laravel/homestead.git
Original file line number Diff line number Diff line change
1
+ ---
2
+ ip : " 192.168.10.10"
3
+ memory : 2048
4
+ cpus : 1
5
+ hostname : code
6
+ name : code
7
+ provider : virtualbox
8
+
9
+ folders :
10
+ - map : " ."
11
+ to : " /home/vagrant/code"
12
+
13
+ sites :
14
+ - map : homestead.app
15
+ to : " /home/vagrant/code/public"
16
+
17
+ databases :
18
+ - homestead
19
+
20
+ # blackfire:
21
+ # - id: foo
22
+ # token: bar
23
+ # client-id: foo
24
+ # client-token: bar
25
+
26
+ # ports:
27
+ # - send: 50000
28
+ # to: 5000
29
+ # - send: 7777
30
+ # to: 777
31
+ # protocol: udp
Original file line number Diff line number Diff line change
1
+ require 'json'
2
+ require 'yaml'
3
+
4
+ VAGRANTFILE_API_VERSION ||= "2"
5
+
6
+ homesteadYamlPath = "Homestead.yaml"
7
+ homesteadJsonPath = "Homestead.json"
8
+ afterScriptPath = "after.sh"
9
+ aliasesPath = "aliases"
10
+
11
+ require File . expand_path ( confDir + '/scripts/homestead.rb' )
12
+
13
+ Vagrant . configure ( VAGRANTFILE_API_VERSION ) do |config |
14
+ if File . exists? aliasesPath then
15
+ config . vm . provision "file" , source : aliasesPath , destination : "~/.bash_aliases"
16
+ end
17
+
18
+ if File . exists? homesteadYamlPath then
19
+ Homestead . configure ( config , YAML ::load ( File . read ( homesteadYamlPath ) ) )
20
+ elsif File . exists? homesteadJsonPath then
21
+ Homestead . configure ( config , JSON . parse ( File . read ( homesteadJsonPath ) ) )
22
+ end
23
+
24
+ if File . exists? afterScriptPath then
25
+ config . vm . provision "shell" , path : afterScriptPath
26
+ end
27
+ end
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ cd code
6
+
7
+ sudo -u vagrant -H bash -c " cp .env.testing .env; \
8
+ if [ ! -f ~/.key_generated ]; then php artisan key:generate; touch ~/.key_generated; fi; \
9
+ composer install; \
10
+ touch storage/database.sqlite; \
11
+ touch storage/testing.sqlite; \
12
+ php artisan migrate; \
13
+ php artisan migrate --database=sqlite_testing;"
You can’t perform that action at this time.
0 commit comments