A docker-compose file for laravel applications with dockerfile.
Dockerfile use php 8.1-fpm
as default version and you can use latest features of laravel version ^9.x
.
As you know you must install Docker with Docker-compose, In order to install these packages you can follow these links:
That's very easy, Just clone the project and pass 3 steps:
- Go to root of the project.
- Run this command for install docker dependencies:
docker-compose up -d
- Go to the code folder and run this command for install laravel
independence See laravel documentation
docker-compose exec app composer create-project laravel/laravel .
-
You can edit
VIRTUAL_HOST
indocker-compose.yml
file and use custom domain for your DOMAIN project and PHPMYADMIN and don't forget add domain to your host. -
After edit anything in
docker-compose
you can run this command for down docker:docker-compose down
and then run this command for start docker:
docker-compose up -d
Enjoy! 😍