A development platform in a box, with everything you would need to develop PHP/Laravel websites.
- Vagrant
1.5.0
+ (Usevagrant version
to check your version) - Virtualbox
Verify that you have the recommended Vagrant version for Vagrant LEMP Stack.
vagrant version
Clone
git clone https://github.com/juy/Vagrant-LEMP-Stack.git new-project
Downlaod https://github.com/juy/Vagrant-LEMP-Stack/archive/master.zip
Add the Vagrant LEMP Stack Box to Vagrant.
vagrant box add juysoft/vagrant-lemp-stack
This will take several minutes so feel free to grab a coffee or a sandwich depending on your internet speed.
The vagrant-cachier plugin helps you reduce the amount of coffee you drink while waiting for boxes to be provisioned by sharing a common package cache among similiar VM instances.
vagrant plugin install vagrant-cachier
Rename vagrant/config.example.yml
file to config.yml
. This is config file, fell free to change any variable.
Run command inside Vagrant LEMP Stack.
vagrant up && vagrant ssh
We don't use shared folder for project, and for now not put any code on Vagrantfile for this. We use SFTP remote access on PhpStorm IDE.
Put your project in virtual machine ~/www
directory. For example ~/www/mylaravel
.
http://mylaravel.app:8800
or http://mylaravel.site:8800
, we explain this on "wildcard system" section. Web port is 8800
, we keep different from 8000, because sometimes maybe we run php artisan serve
outside virtual machine.
Vagrant LEMP Stack is use Nginx wildcard system for infinite project. You don't need configure any virtualhost or edit some Nginx files. At the same time don't need Nginx config reload or restart any service.
There is two domain extension, .app
and .site
. .app
extension is usable for laravel project, this extension search a extra public
directory on project root. .site
extension is usable for normal site project, like wordpress, or any kind of project direct run on root/index.php
file.
Domain name is same as project directory name, our before example is mylaravel
. If we use http://mylaravel.app:8800
, Nginx look a public/
directory, if we use http://mylaravel.site:8800
, Nginx dont look public/
directory.
Important:
For windows we need add every single project on C:\Windows\System32\drivers\etc\hosts
file, example:
127.0.0.1 mylaravel.app # http://mylaravel.app:8800
127.0.0.1 testlaravel.app # http://testlaravel.app:8800
127.0.0.1 wordpress.site # http://wordpress.site:8800
Shema of wildcard system
*.app:8800 -> www/*/public
*.site:8800 -> www/*
Simple dashboard
http://127.0.0.1:8800
MailCatcher
http://127.0.0.1:1080
http://machine-ip:1080
Beanstalkd console
http://127.0.0.1:8501
http://machine-ip:8501
Redis commander
http://127.0.0.1:8502
http://machine-ip:8081
MySQL credentials for remote access
IP 127.0.0.1
Port 33060
Database homestead
User root homestead
Password secret
PostgreSQL credentials for remote access
IP 127.0.0.1
Port 54320
Database homestead
User root
Password secret
Shell-SSH
IP 127.0.0.1
Port 2222
User vagrant
Password vagrant
Check outdated box
vagrant box outdated
Update box
vagrant box update
This commands for virtual ubuntu, need connect via ssh or vagrant ssh
apt-get update
apt-get upgrade
apt-get dist-upgrade
composer self-update
composer global update
npm update -g
- OS
- Ubuntu Server 15.04 Vivid Vervet (64-bit) - boxcutter/ubuntu1504 v1.1.0
- Base Packages
- Ansible 1.9.2
- Nginx 1.8.0
- PHP 5.6.11 (php-fpm)
- Git 2.4.6, git-flow, git-extras
- Composer
- Ruby 2.1.2p95
- HHVM 3.8.0 (Only for composer speed up)
- VirtualBox Guest Additions 4.3.28
- Databases
- MySQL 5.6.24
- PostgreSQL 9.4.4
- SQLite 3.8.7.4
- In-Memory Stores
- Redis 3.0.3
- Memcached 1.4.14
- Utility
- Mailcatcher 0.6.1
- Beanstalkd 1.10
- Supervisord 3.0
- Blackfire profiler 0.27.0
- Ngrok 2.0.19
- Asset tools
- node.js 0.10.40, npm 1.4.28
- bower 1.4.1
- gulp 3.9.0
- Composer global packages
- Laravel Installer 1.2.1
- Lumen Installer 1.0.1
- Laravel Envoy 1.0.24
- SSH tools
- htop
- mytop
- pgtop
- ngxtop
- autojump
- screen
- Web GUI tools
- Beanstalkd console - https://github.com/ptrofimov/beanstalk_console
- Redis Commander - https://github.com/joeferner/redis-commander
This project is open-sourced software licensed under the MIT license.