Skip to content

CR1ST14ANO/laravel-mix-6-laravel-9

Repository files navigation

Setup Docker Para Projetos Laravel 9 com PHP 8

Passo a passo

Clone Repositório

git clone  https://github.com/CR1ST14ANO/setup-laravel-9-php-8-laravel-mix-6 laravel-mix
cd laravel-mix/

Remova o versionamento

rm -rf .git/

Copie o Arquivo .env

cp .env.example .env

Atualize as variáveis de ambiente do arquivo .env

APP_NAME=Laravel9
APP_URL=http://localhost:80

DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=nome_que_desejar_db
DB_USERNAME=root
DB_PASSWORD=root

CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis

REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379

Para Instalar o Docker no ubuntu (WSL) https://docs.docker.com/engine/install/ubuntu/

Necessário Node.js (> v16) Recomendado NVM Para Instalar no WSL: https://learn.microsoft.com/pt-br/windows/dev-environment/javascript/nodejs-on-wsl

Após criar e atualizar a .env do projeto, execute o comanando para buildar os containers

docker compose build --no-cache

Suba os containers do projeto

docker compose up -d

Acessar o container

docker exec -it app bash

Instalar as dependências do projeto

composer install

Gerar a key do projeto Laravel

php artisan key:generate

Instalar as dependências node.js

npm install
npm run watch

Acesse o projeto http://localhost

About

Setup Laravel Mix com Laravel 9, PHP 8.1, Bootstrap 5

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published