https://github.com/michaelbunch/docker-laravel
https://github.com/michaelbunch/docker-laravel
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/michaelbunch/docker-laravel
- Owner: michaelbunch
- Created: 2016-02-09T19:38:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-12-07T14:55:53.000Z (over 9 years ago)
- Last Synced: 2025-03-15T07:46:09.553Z (over 1 year ago)
- Language: Nginx
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Laravel
Docker containers for starting a Laravel project.
## Requirements
You will need to have Docker running in some capacity.
* Locally: Docker for Mac, Linux, or Windows
* VM: Vagrant, VirtualBox, or another virtual machine
## How To Use
NOTE: These instructions assume you familiar with Docker.
Copy and past the `containers` folder and `docker-compose.yml` file to the root of you Laravel (or PHP) project.
From the environment that has Docker installed and running, issue the following command from your project root.
```
docker-compose up -d
```
Once the startup process is complete, go to `http://localhost:8080`. If you are running Docker in a VM, you may
need to use the IP address of the VM instead of `localhost`.
There are is also an example `.env` file to show how PHP can access the containers for database, queues, and sessions.
## Containers
Most container names are generic to allow their images to be swapped for similar technologies easier. For example, the
web container currently uses Nginx but this could be swapped with Apache or Caddy without needing to change other settings.
### Web
Nginx container that runs handles web requests. It routes requests that require PHP to the app container for processing.
### App
PHP-FPM container for processing PHP files.
### DB
Database container that uses MariaDB. This can be switched to other database containers like MySQL, Postgres, etc.
### Redis
Redis container for queues, sessions, and other key/value storage.