- Clone the repository
git clone https://github.com/Developer-Rezwan/Application-dockerization.git
- Inside the project folder > for the first time you need to run...
For Ubuntu :sudo docker compose up --build -d
For Mac :docker-compose up --build -d
For Windows :docker-compose up --build -d
Note: For next time, you don't need to run with --build
flag, just run sudo docker compose up -d
* Nginx:alpine
* Php:8.0.23-fpm-alpine3.16
* Mysql:latest
* Redis:alpine
Inside the laravel-app
container you need to run composer update
. You can run all the command of a laravel application like php artisan migrate
. To do this run .
sudo docker ps
sudo docker exec -it <container id> /bin/sh
// inside the container terminal run this command
composer update
php artisan migrate
After all done you will browse your app by https://localhost or https://127.0.0.1
Note: Must run with https://
. Because , SSL is configured by NGINX.
If You want to run by you custom domain. like https://laravel-app.dev
. You need to configure your local machine.
Go to /etc/hosts
and configure your DNS.