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
git clone https://github.com/saada/docker-lumen.git
cd docker-lumenCreate Lumen App
now, create the app in the images/php directory named app
cd images/php
docker run --rm -it -v $(pwd):/app saada/lumen-cli lumen new appConfiguration
There are two configurations using .env files. One .env file for docker-compose.yaml and another for the php application.
# copy both files and make changes to them if needed
cp .env.docker.example .env
cp .env.app.example images/php/app/.envTo 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
Docker for Windows
Docker for Linux
Build & Run
docker-compose up --build -dNavigate to 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
docker-compose downRunning Artisan commands
docker-compose exec php sh
# inside the container
cd ..
php artisan migrate
php artisan cache:clearContribute
Submit a Pull Request!

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

