8000 GitHub - mgrave/laravel-vite-docker: Running Laravel and React stacks together using Vite and InertiaJS on Docker.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

mgrave/laravel-vite-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MIT License LinkedIn


Laravel-Vite-Docker

Running Laravel and React stacks together using Vite and InertiaJS on Docker.
Explore project's blog »

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This is a Laravel boilerplate running with ReactJS as frontend on Docker. It makes use of Vite and InertiaJS to achieve this.

For more details, please refer to the project's Blog

(back to top)

Built With

Here is a list of major frameworks used to bootstrap the project.

  • React
  • Laravel

(back to top)

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

In order to run this prroject you should have Docker and Docker Compose installed on your local machine.

Installation

To set up the application simply clone the repo using the below command.

git clone https://github.com/elvinlari/laravel-vite-docker.git

(back to top)

Usage

You can use this code as a boilerplate for building your next Cloud Native Laravel application.

Containers from this project can be deployed on Kubernetes, Docker Swarm or whichever orchestrator you prefer.

(back to top)

Roadmap

  • Project core
  • Add git actions for creating and uploading docker images to a Registry

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE file for more information.

(back to top)

Contact

Elvin Lari - @elvinlarie - elvinlari@gmail.com

Project Link: https://github.com/elvinlari/laravel-vite-docker

(back to top)

Acknowledgments

Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!

(back to top)

SECUENCIA DE COMANDOS DE DOCKER Y LARAVEL

Estos comandos te ayudarán a configurar y ejecutar tu aplicación Laravel utilizando Docker y Composer.

Limpiar el sistema Docker

docker system prune -a  # [OPT] Limpia todos los contenedores, imágenes, redes y volúmenes no utilizados.

docker-compose up --build nginx -d  # Construye y levanta el contenedor nginx en segundo plano.

docker-compose run --rm composer clear-cache  # [OPT] Limpia la caché de Composer.
docker-compose run --rm composer install  # Instala las dependencias definidas en composer.json.
docker-compose run --rm composer dump-autoload  # [OPT] Re-genera el archivo autoload de Composer.
docker-compose run --rm composer require laravel/breeze --dev  # [OPT] Añade laravel/breeze como dependencia de desarrollo.
docker-compose run --rm composer require inertiajs/inertia-laravel  # [OPT VITE] Añade Inertia.js para Laravel.
docker-compose run --rm composer require tightenco/ziggy  # [OPT] Añade Tightenco/Ziggy para manejo de rutas.
docker-compose run --rm composer require sebastian/version  # [OPT] Añade sebastian/version.
docker-compose run --rm composer update  # [OPT] Actualiza todas las dependencias de Composer.

docker-compose run --rm laravel-migrate-seed  # Ejecuta migraciones y seeds.

docker-compose run --rm artisan migrate:status  # [OPT] Verifica el estado de las migraciones.
docker-compose run --rm artisan key:generate  # [OPT] Genera una nueva clave de aplicación.
docker-compose run --rm artisan optimize  # [OPT] Optimiza el cargador automático.
docker-compose run --rm artisan config:cache  # [OPT] Cachea el archivo de configuración.
docker-compose run --rm artisan optimize  # [OPT] Optimiza la configuración de la aplicación.
docker-compose run --rm artisan serve  # [OPT] Inicia el servidor de desarrollo de Laravel.
docker-compose run --rm artisan route:list  # [OPT] Lista todas las rutas definidas en la aplicación.
docker-compose run --rm artisan inertia:middleware  # [OPT] Configura el middleware de Inertia.js.


docker-compose run --rm npm install  # Instala las dependencias definidas en package.json.
docker-compose run --rm npm install @myorg/privatepackage  # [ERROR] Instala un paquete privado específico.
docker-compose run --rm npm run build  # Construye la aplicación para producción.
docker-compose run --rm npm i react react-dom @inertiajs/inertia @inertiajs/inertia-react jsconfig.json @inertiajs/progress  # [OPT] Añade React y otros paquetes necesarios.
docker-compose run --rm npm add @vitejs/plugin-react  # [OPT] Añade el plugin React para Vite.


docker-compose run --rm --service-ports npm run dev  # [ERROR] Inicia el servidor de desarrollo utilizando Vite.


#admin@gmail.com:password

About

Running Laravel and React stacks together using Vite and InertiaJS on Docker.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.1%
  • CSS 5.8%
  • Other 1.1%
0