Overview
This repo is a Laravel-React-Docker boilerplate that provides a solid starting point for building a project using these technologies. It includes PHP 8.2.3, Laravel 10, Laravel Websockets, Laravel Horizon, React 17, Vite 3, ESLint 8, TypeScript 4.7, Husky/Commit lint, Redis 7, Postgres 14.4, and Nginx 1.23. The purpose of this repo is to offer a monolithic repository for easy project setup and development.
Features
- Laravel 10 for server-side programming
- React 17 for building dynamic user interfaces
- Docker for containerization and easy development environment setup
- Laravel Websockets for real-time communication
- Laravel Horizon for managing queues
- Vite 3 for fast front-end development
- ESLint and TypeScript for code quality and type-checking
- Husky and Commit lint for enforcing commit message conventions
- Redis for in-memory data caching
- Postgres for database storage
- Nginx for serving the application
Installation
To install this boilerplate, follow these steps:
- Install Docker Desktop.
- Clone the repository using the command
git clone git@github.com:lockhinator/laravel-react-docker-boilerplate.git. - Change into the directory using
cd laravel-react-docker-boilerplate. - Copy the
.env.examplefile to.envusing the commandcp .env.example .env. - Update the
.envfile to configure the database connection. - Run the following commands to build and run the repository in Docker:
docker-compose build fpm node web docker-compose run --rm fpm php artisan key:generate docker-compose run --rm fpm php artisan migrate docker-compose run --rm fpm composer install docker-compose run --rm node yarn docker-compose up -d - Visit
http://localhostto ensure that the application is running. - Start building your app!
Summary
The Laravel-React-Docker boilerplate provides a comprehensive starting point for developers looking to build projects using Laravel, React, and Docker. It includes key features such as Laravel Websockets, Laravel Horizon, and Vite for efficient and real-time development. The installation process is straightforward, relying on Docker for easy setup and containerization. With this boilerplate, developers can start building their applications quickly and efficiently.