Docker based development environment for Laravel- Includes Caddy, MariaDB, PHP, Redis, Mailhog and Adminer.
Creates a full development environment for Laravel containing:
- Caddy (Web Server)
- MariaDB
- Redis
- PHP (7.3)
- Mailhog
- Adminer
You can easily customize this further by editing the docker-compose.yml
file yourself.
The easiest way to use this is by cloning it into a directory for each site you want.
git clone https://github.com/PeterBooker/laraveldev.git dir-name
Next, from the newly created directory, start up the Docker containers:
docker-compose up -d
Now you can continue as you would normally, either by symlinking your project to ./docker/html/
or setting up a new project. For convenience the PHP container has composer installed, allowing you to connect to the container docker exec -it local_php_1 /bin/sh
and set up a new project as you would normally (the root needs to be at /var/www/html
).
From this point you can start and stop the containers with:
docker-compose start
and docker-compose stop
Finally, you can remove the containers:
docker-compose down
- Replace Caddy with NGINX and Apache, switched via Environment Variable.
- Add convenience scripts for DB backups, DB imports and adding content like Theme Unit Test data.
Licensed under MIT.