Local Development Dream -- Raft
This is a full Laravel local development experience (opinionated) which comes with:
- Php 7.1
- Node 7.5
- Yarn
- Queue
- Redis
- MariaDB, (*1)
This can be compared to:
- Laravel Homestead (Straight VMs) vs Raft (Single proxy VM + Docker containers)
- Laravel Valet (Local Nginx proxy + local database etc.) vs Raft (All containers), (*2)
Installation
First ensure you have the system dependencies., (*3)
Now install and start Dinghy, (*4)
brew tap codekitchen/dinghy
brew install dinghy
dinghy create --provider virtualbox
Next install the package through Composer., (*5)
{
"require": {
"loganhenson/raft": "~1.0"
}
}
And add the service provider to your application., (*6)
config/app.php, (*7)
...
'providers' => [
'...',
LoganHenson\Raft\RaftServiceProvider::class
];
...
Usage
Up, (*8)
php artisan raft:up
Up with SSL, (*9)
php artisan raft:up --secure
Down, (*10)
php artisan raft:down
Sequel Pro, (*11)
php artisan raft:sql
Running commands in your containers
Composer, (*12)
docker exec raft_app_1 composer
Yarn, (*13)
docker exec raft_app_1 yarn
Connecting to your containers
App, (*14)
docker exec -it raft_app_1 bash
Redis, (*15)
docker exec -it raft_redis_1 bash
MariaDB, (*16)
docker exec -it raft_database_1 bash
Queue, (*17)
docker exec -it raft_queue_1 bash
View the site @ http://raft.docker or https://raft.docker, (*18)
FAQ
Q: It isn't working!
- A: Make sure docker is running (check your toolbar), as well as the dinghy vm dinghy restart, (*19)
Q: Chrome always puts my site on https!
- A: Go to chrome://net-internals/#hsts and put raft.docker in the "Delete Domain" input and press delete, (*20)
Q: How do I add more/different containers??
- A: Fork (:, (*21)
License
View the license for this repo., (*22)