https://github.com/davidix/laravel-docker-compose
https://github.com/davidix/laravel-docker-compose
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/davidix/laravel-docker-compose
- Owner: davidix
- Created: 2021-06-01T21:11:10.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-03T21:52:52.000Z (about 5 years ago)
- Last Synced: 2026-01-03T16:29:29.700Z (7 months ago)
- Language: Dockerfile
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-compose-laravel
A pretty simplified Docker Compose workflow that sets up a LEMP network of containers for local Laravel development.
## Usage
To get started, make sure you have [Docker installed](https://docs.docker.com/docker-for-mac/install/) on your system, and then clone this repository.
Next, navigate in your terminal to the directory you cloned this, and spin up the containers for the web server by running `docker-compose up -d --build site`.
Bringing up the Docker Compose network with `site` instead of just using `up`, ensures that only our site's containers are brought up at the start, instead of all of the command containers as well. The following are built for our web server, with their exposed ports detailed:
- **nginx** - `:80`
- **mysql** - `:3306`
- **php** - `:9000`
- **redis** - `:6379`
- **mailhog** - `:8025`
Three additional containers are included that handle Composer, NPM, and Artisan commands *without* having to have these platforms installed on your local computer. Use the following command examples from your project root, modifying them to fit your particular use case.
- `docker-compose run --rm composer update`
- `docker-compose run --rm npm run dev`
- `docker-compose run --rm artisan migrate`
[cloned from](https://github.com/aschmelyun/docker-compose-laravel).