This repository was archived by the owner on May 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 95926b8
Showing
35 changed files
with
1,480 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/vendor | ||
/.vagrant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
ip: "192.168.10.10" | ||
memory: 2048 | ||
cpus: 1 | ||
provider: virtualbox | ||
|
||
folders: | ||
- map: /Users/swader/vagrant_boxes/homestead/homestead_original | ||
to: /home/vagrant/Code | ||
|
||
sites: | ||
- map: homestead.app | ||
to: /home/vagrant/Code/Laravel/public | ||
|
||
databases: | ||
- homestead | ||
|
||
variables: | ||
- key: APP_ENV | ||
value: local | ||
|
||
# blackfire: | ||
# - id: foo | ||
# token: bar | ||
# client-id: foo | ||
# client-token: bar | ||
|
||
# ports: | ||
# - send: 93000 | ||
# to: 9300 | ||
# - send: 7777 | ||
# to: 777 | ||
# protocol: udp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) <Taylor Otwell> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'json' | ||
require 'yaml' | ||
|
||
VAGRANTFILE_API_VERSION = "2" | ||
confDir = $confDir ||= File.expand_path(".") | ||
|
||
homesteadYamlPath = confDir + "/Homestead.yaml" | ||
homesteadJsonPath = confDir + "/Homestead.json" | ||
afterScriptPath = confDir + "/after.sh" | ||
aliasesPath = confDir + "/aliases" | ||
|
||
require File.expand_path(File.dirname(__FILE__) + '/scripts/homestead.rb') | ||
|
||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
if File.exists? aliasesPath then | ||
config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases" | ||
end | ||
|
||
if File.exists? homesteadYamlPath then | ||
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath))) | ||
elsif File.exists? homesteadJsonPath then | ||
Homestead.configure(config, JSON.parse(File.read(homesteadJsonPath))) | ||
end | ||
|
||
if File.exists? afterScriptPath then | ||
config.vm.provision "shell", path: afterScriptPath | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
# If you would like to do some extra provisioning you may | ||
# add any commands you wish to this file and they will | ||
# be run after the Homestead machine is provisioned. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
alias ..="cd .." | ||
alias ...="cd ../.." | ||
|
||
alias h='cd ~' | ||
alias c='clear' | ||
alias artisan='php artisan' | ||
|
||
alias phpspec='vendor/bin/phpspec' | ||
alias phpunit='vendor/bin/phpunit' | ||
|
||
function serve() { | ||
if [[ "$1" && "$2" ]] | ||
then | ||
sudo dos2unix /vagrant/scripts/serve.sh | ||
sudo bash /vagrant/scripts/serve.sh "$1" "$2" 80 | ||
else | ||
echo "Error: missing required parameters." | ||
echo "Usage: " | ||
echo " serve domain path" | ||
fi | ||
} | ||
|
||
function serve-hhvm() { | ||
if [[ "$1" && "$2" ]] | ||
then | ||
sudo dos2unix /vagrant/scripts/serve-hhvm.sh | ||
sudo bash /vagrant/scripts/serve-hhvm.sh "$1" "$2" 80 | ||
else | ||
echo "Error: missing required parameters." | ||
echo "Usage: " | ||
echo " serve-hhvm domain path" | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
if [ "$(uname)" == "Darwin" ] | ||
then | ||
# Mac OSX | ||
sed -i '' "s@map\: \.@map\: $PWD@g" Homestead.yaml | ||
elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ] | ||
then | ||
sed -i "s@map\: \.@map\: $PWD@g" Homestead.yaml | ||
elif [ -n "$COMSPEC" -a -x "$COMSPEC" ] | ||
then | ||
var=$PWD | ||
sub=${var:1:1} | ||
workdir=${var/$sub/":/"}; | ||
sed -i "s@map\: \.@map\: $workdir@g" Homestead.yaml | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"name": "laravel/homestead", | ||
"description": "A virtual machine for web artisans.", | ||
"require": { | ||
"php": ">=5.4", | ||
"symfony/console": "~2.0", | ||
"symfony/process": "~2.0" | ||
}, | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Taylor Otwell", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Laravel\\Homestead\\": "src/" | ||
} | ||
}, | ||
"bin": [ | ||
"homestead" | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
$_ENV['HOME'] = getenv('HOME'); | ||
$_ENV['VAGRANT_DOTFILE_PATH'] = homestead_path().DIRECTORY_SEPARATOR.'.vagrant'; | ||
|
||
if (file_exists(__DIR__.'/vendor/autoload.php')) { | ||
require __DIR__.'/vendor/autoload.php'; | ||
} else { | ||
require __DIR__.'/../../autoload.php'; | ||
} | ||
|
||
function homestead_path() | ||
{ | ||
if (isset($_SERVER['HOME'])) { | ||
return $_SERVER['HOME'].'/.homestead'; | ||
} else { | ||
return $_SERVER['HOMEDRIVE'].$_SERVER['HOMEPATH'].DIRECTORY_SEPARATOR.'.homestead'; | ||
} | ||
} | ||
|
||
$app = new Symfony\Component\Console\Application('Laravel Homestead', '2.1.7'); | ||
|
||
$app->add(new Laravel\Homestead\DestroyCommand); | ||
$app->add(new Laravel\Homestead\EditCommand); | ||
$app->add(new Laravel\Homestead\HaltCommand); | ||
$app->add(new Laravel\Homestead\InitCommand); | ||
$app->add(new Laravel\Homestead\MakeCommand); | ||
$app->add(new Laravel\Homestead\ProvisionCommand); | ||
$app->add(new Laravel\Homestead\ResumeCommand); | ||
$app->add(new Laravel\Homestead\RunCommand); | ||
$app->add(new Laravel\Homestead\UpCommand); | ||
$app->add(new Laravel\Homestead\UpdateCommand); | ||
$app->add(new Laravel\Homestead\SshCommand); | ||
$app->add(new Laravel\Homestead\SshConfigCommand); | ||
$app->add(new Laravel\Homestead\StatusCommand); | ||
$app->add(new Laravel\Homestead\SuspendCommand); | ||
|
||
$app->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Homestead Improved | ||
|
||
A fork of the original Laravel Homestead, this improved version aims to make things even simpler. | ||
See full explanation with quickstart tutorial [here](http://www.sitepoint.com/quick-tip-get-homestead-vagrant-vm-running/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
agent="[blackfire] | ||
ca-cert= | ||
collector=https://blackfire.io | ||
log-file=stderr | ||
log-level=1 | ||
server-id="$1" | ||
server-token="$2" | ||
socket=unix:///var/run/blackfire/agent.sock | ||
spec= | ||
" | ||
|
||
client="[blackfire] | ||
ca-cert= | ||
client-id="$3" | ||
client-token="$4" | ||
endpoint=https://blackfire.io | ||
timeout=15s | ||
" | ||
|
||
echo "$agent" > "/etc/blackfire/agent" | ||
echo "$client" > "/home/vagrant/.blackfire.ini" | ||
|
||
# Disable xdebug to prevent conflict | ||
php5dismod xdebug | ||
service hhvm restart | ||
service php5-fpm restart | ||
service blackfire-agent restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Clear The Old Nginx Sites | ||
|
||
rm -f /etc/nginx/sites-enabled/* | ||
rm -f /etc/nginx/sites-available/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Clear The Old Environment Variables | ||
|
||
sed -i '/# Set Homestead Environment Variable/,+1d' /home/vagrant/.profile | ||
sed -i '/env\[.*/,+1d' /etc/php5/fpm/php-fpm.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
DB=$1; | ||
|
||
mysql -uhomestead -psecret -e "CREATE DATABASE IF NOT EXISTS \`$DB\` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_unicode_ci"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
|
||
DB=$1; | ||
# su postgres -c "dropdb $DB --if-exists" | ||
su postgres -c "createdb -O homestead '$DB' || true" |
Oops, something went wrong.