This Laravel starter template is intended to be used for new projects.
For details on how to contribute to this repo, please check out the contributing guide.
- What's Included
- Requirements
- Using This Repository
- Continuous Integration/Deployment Workflow - Diagram - Video
- Roadmap
- FAQ
- Latest version of Laravel.
- Pre-configured
docker-compose.yml
that uses nginx, php-fpm and PostgreSQL. (How can I use MySQL?) - Travis-CI integration:
- Checks psr-2 compliance with phpcs.
- Runs phpunit tests within docker containers.
- Pushes deploy-ready containers for
staging
andmaster
branches to DockerHub.
- Environment reset script to allow a dev to easily reset a seeded environment
- Example configuration for deploying to Rancher.
We recommend watching this repository so you can apply updates made to this project to yours.
Realpage teams should contact [email protected] using this email template to get everything setup.
For everyone else:
- Clone this repo and delete the
.git
directory - Run
git init
and change the origin of the repo to point to your remote repository - Reference the contributing guide for running this application locally
docker exec -it $(docker ps -f name=fpm -q) php artisan clean:template
to strip out example migrations, seeds, tests, etc...
Notes on developing:
- This uses Laravel Elixir
, which acts as an abstraction on top of Gulp
- Running
gulp
will provide linting according to the realpage-ui/development-standards for CSS and SCSS
If you intend to use Laravel Elixir, please read https://github.com/realpage/laravel-starter/issues/29
Create a repository that mirrors your GitHub namespace/repository except does not include dashes (DockerHub doesn't allow dashes). The travis configuration is already designed to handle this transition for you. An example of this would be:
GitHub: my-namespace/my-new-project DockerHub: mynamespace/mynewproject
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.
### Roadmap- Add support for elixir to the docker containers
- the
default.conf
file located in theinfrastructure/nginx
directory will be added to the nginx container as part of the build - update the file and rebuild the container via
docker-compose build
to propagate the changes
Yes! Using an alias below, you can run commands in containers with dockerexc fpm php -v
instead of docker exec -it $(docker ps -f name=fpm -q) php -v
.
alias dockerexc='function _docker_exec(){ service=$1; shift; docker exec -it $(docker-compose ps -q ${service}) "$@" };_docker_exec'