Code Monkey home page Code Monkey logo

app-laravel-docker's Introduction

Forkar e clonar o repositório

Premissas: Ter o Git, Docker e Docker-compose instalado

git clone --recurse-submodules --remote-submodules [email protected]:<seu-usuario>/app-laravel-docker.git

Acessar o diretório app-laravel-docker

cd app-laravel-docker

Renomear o arquivo .env.example para .env

cp .env.example .env

.env

DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=app-laravel
DB_USERNAME=root
DB_PASSWORD=secret

MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS="[email protected]"
MAIL_FROM_NAME="${APP_NAME}"

Acessar o diretório laradock

Renomar o arquivo .env.example para .env

cp .env.example .env

.env

PHP_VERSION=8.2
MYSQL_VERSION=latest
MYSQL_DATABASE=app-laravel
MYSQL_USER=user
MYSQL_PASSWORD=secret
MYSQL_PORT=3306
MYSQL_ROOT_PASSWORD=secret

No diretório laradock, execute:

docker-compose up -d nginx mysql adminer mailhog workspace

Aguarde e depois verifique com o comando seguinte

docker ps

Estando OK, acesse o container

docker exec -it <container-id-workspace-laradock> bash

composer install

php artisan key:generate

No browser acesse http://localhost irá exibir a página default do Laravel

Para acessar o Adminer http://localhost:8081 , utilize as credenciais que definiu nas variáveis MYSQL_ROOT_PASSWORD

Para acessar o MailHog (webmail) http://localhost:8025

Feito!

app-laravel-docker's People

Contributors

rmsaitam avatar

Watchers

 avatar

Forkers

cperbony

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.