https://github.com/rishantagarwal/docker-lumen-mysql-nginx-phpmyadmin
https://github.com/rishantagarwal/docker-lumen-mysql-nginx-phpmyadmin
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rishantagarwal/docker-lumen-mysql-nginx-phpmyadmin
- Owner: rishantagarwal
- Created: 2017-03-10T04:22:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T12:47:56.000Z (over 9 years ago)
- Last Synced: 2025-01-25T06:41:22.614Z (over 1 year ago)
- Language: PHP
- Size: 825 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker + Lumen with Nginx and MySQL

This setup is great for writing quick apps in PHP using Lumen from an any Docker client. It uses docker-compose to setup the application services.
## Clone this repo
```bash
git clone https://github.com/saada/docker-lumen.git
cd docker-lumen
```
## Create Lumen App
now, create the app in the `images\php` directory named `app`
```bash
cd images/php
docker run --rm -it -v $(pwd):/data/www --entrypoint /root/.composer/vendor/bin/lumen alairock/lumen new app
```
### Configuration
To change configuration values, look in the `docker-compose.yml` file and change the `php` container's environment variables. These directly correlate to the Lumen environment variables.
## Docker Setup
### [Docker for Mac](https://docs.docker.com/docker-for-mac/)
### [Docker for Windows](https://docs.docker.com/docker-for-windows/)
### [Docker for Linux](https://docs.docker.com/engine/installation/linux/)
### Build & Run
```bash
docker-compose up --build -d
```
Navigate to [http://localhost:80](http://localhost:80) and you should see something like this

Success! You can now start developing your Lumen app on your host machine and you should see your changes on refresh! Classic PHP development cycle. A good place to start is `images/php/app/routes/web.php`.
Feel free to configure the default port 80 in `docker-compose.yml` to whatever you like.
### Stop Everything
```bash
docker-compose down
```
## Contribute
Submit a Pull Request!