This is the skeleton of a Laravel application that I use to save the initial setup that I usually make. Feel free to use and to customize according to your needs.
To create a project from this repository:
git clone --depth=1 --branch=master [email protected]:Zizaco/laravel-project.git <projectName>
cd !$
rm -rf .git
composer run-script post-root-package-install
composer install
composer run-script post-create-project-cmd
laravelcollective/html
package.laravel-elixir-imagemin
topackage.json
in order to minify images.bower.json
and.bowerrc
with jquery.- Base asset structure to resources directory.
app.js
to handle initialization of javascript modules based in the markup.- Main .less file.
- initial
gulpfile.js
to handle tasks regarding assets. Dockerfile
,docker-compose.yml
and a 'database' directory to store database container data.
Install Docker on your system.
- Install instructions for Mac OS X
- Install instructions for Ubuntu Linux
- Install instructions for other platforms
Install Docker Compose on your system.
To start the containers
docker-compose build # only the first time
docker-compose up
If you are running the application for the first time you should run the migrations and the default gulp task (to compile the assets)
docker exec -i -t <projectName>_web_1 composer install # install php dependencies
docker exec -i -t <projectName>_web_1 bower install --allow-root # install front-end dependencies
docker exec -i -t <projectName>_web_1 php artisan migrate # run migrations
docker exec -i -t <projectName>_web_1 gulp # run laravel's elixir
PS: "" is name of the directory the project is within. Docker-compose uses this convention.
Latter, you ran keep the elixir watcher running with
docker exec -i -t <projectName>_web_1 gulp watch
Finally, you can access the containers interactively with
docker exec -i -t <projectName>_web_1 bash # to access the web server container
docker exec -i -t <projectName>_web_1 php artisan tinker # to access Laravel's REPL
mysql --host 127.0.0.1 -u root # to access the database
This project is open-source and licensed under the MIT license