This Laravel starter template is intended to be used for new projects that utilize Docker for local development and/or production.
- Pre-configured
docker-compose.yml
that uses nginx, php-fpm and MySQL. gitlab
branch for a CI pipeline that builds, tests and pushes containers to the registry. Add a deploy step to meet your needs and you're donetravis-ci
branch includes examples using Travis-CI for building docker containers, running tests against them and pushing them to Dockerhub.
Take the contents of this repository and drop these files into the root of your project. Then run the following commands:
docker-compose up
- Brings the containers online. The fist time through this will build your containersdocker-compose exec web php artisan migrate --seed
- Runs the migrations/seeders from within the docker container- Access your site at http://localhost
No configuration required.
Create a repository and replace bkuhl/laravel-starter
with your project's repository information in .travis-ci.yml
and docker-compose.yml
.
Configure the following environment variables:
DOCKER_USERNAME
DOCKER_PASSWORD
This user needs to have permission to write to the DockerHub repository so that it can push images.