Project Starter For Web Application Development with Laravel, MySQL, Nginx, and Docker.
- Docker
- Dockerfile with Alpine
- Nginx
- Laravel 10
- MySQL
- PHP 8.2
- Node
- NPM
- PHP Prettier
- Github Action Check Code Format Using Prettier
Follow the instruction below to setting up your project.
- Download and Install Docker
- By Clicking Use This Template Button or You can Click Here
make run-app-with-setup: build docker and start all docker container with laravel setupmake run-app-with-setup-db: build docker and start all docker container with laravel setup + database migration and seedermake run-app: start all docker containermake kill-app: kill all docker containermake enter-nginx-container: enter docker nginx containermake enter-php-container: enter docker php containermake enter-mysql-container: enter docker mysql containermake flush-db: run php migrate fresh commandmake flush-db-with-seeding: run php migrate fresh command with seeding
- Create .env file for laravel environment from .env.example on src folder
- Run command
docker-compose buildon your terminal - Run command
docker-compose up -don your terminal - Run command
composer installon your terminal after went into php container on docker - Run command
docker exec -it php /bin/shon your terminal - Run command
chmod -R 777 storageon your terminal after went into php container on docker - If app:key still empty on .env run
php artisan key:generateon your terminal after went into php container on docker - To run artisan command like migrate, etc. go to php container using
docker exec -it php /bin/sh - Go to http://localhost:8001 or any port you set to open laravel
Note: if you got a permission error when running docker, try running it as an admin or use sudo in linux

