https://github.com/jguyomard/docker-laravel
:whale: Docker Images for Laravel development
https://github.com/jguyomard/docker-laravel
docker docker-compose docker-image laravel mysql nginx php postgresql redis
Last synced: 3 months ago
JSON representation
:whale: Docker Images for Laravel development
- Host: GitHub
- URL: https://github.com/jguyomard/docker-laravel
- Owner: jguyomard
- License: mit
- Created: 2017-08-26T19:54:30.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-09-10T08:51:03.000Z (over 6 years ago)
- Last Synced: 2023-11-07T19:30:00.015Z (about 2 years ago)
- Topics: docker, docker-compose, docker-image, laravel, mysql, nginx, php, postgresql, redis
- Language: Dockerfile
- Homepage:
- Size: 13.7 KB
- Stars: 110
- Watchers: 4
- Forks: 63
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Images for Laravel development
[](https://hub.docker.com/r/jguyomard/laravel-php/)
[](https://hub.docker.com/r/jguyomard/laravel-nginx/)
[](https://hub.docker.com/r/jguyomard/laravel-capistrano/)
This repository provides you a development environment without requiring you to install PHP, a web server, and any other server software on your local machine. For this, it requires Docker and Docker Compose.
## Installation
1. Install [docker](https://docs.docker.com/engine/installation/) and [docker-compose](https://docs.docker.com/compose/install/) ;
2. Copy `docker-compose.yml` file to your project root path, and edit it according to your needs ;
3. From your project directory, start up your application by running:
```sh
docker-compose up
```
4. If you want, you can run composer or artisan through docker. For instance:
```sh
docker-compose exec php composer install
docker-compose exec php php artisan migrate
docker-compose exec php $yourCommandHere
```
## Docker Images
These docker images are configured in `docker-compose.yml` file.
You can comment or uncomment some services according to your project.
* [`jguyomard/laravel-php:7.3`](https://hub.docker.com/r/jguyomard/laravel-php/) (this docker image extends `php:7.3-fpm-alpine` to add some PHP extensions) ;
* [`jguyomard/laravel-nginx:1.13`](https://hub.docker.com/r/jguyomard/laravel-nginx/) (this docker image extends `nginx:1.13-alpine` to add Laravel vhost) ;
* `mysql:5.7` ;
* `postgres:9.6-alpine` ;
* `redis:4.0-alpine` ;
* `elasticsearch:5.5-alpine`.
## Other tools
This repository also comes with a caspistrano docker image: [`jguyomard/laravel-capistrano:3.9`](https://hub.docker.com/r/jguyomard/laravel-capistrano/).
For ease of use, you can create a bash alias:
```
alias cap='docker run --rm --user cap -v "$PWD":/src -v "$(dirname $SSH_AUTH_SOCK)":"$(dirname $SSH_AUTH_SOCK)" -e SSH_AUTH_SOCK="${SSH_AUTH_SOCK}" jguyomard/laravel-capistrano:3.9 cap'
```
## Contributing
Contributions are welcome!
Leave an issue on Github, or create a Pull Request.
## Licence
This work is under [MIT](LICENCE) licence.