Skip to content

the-web-artisan/laravel-docker

Repository files navigation

DOCKER FOR A LARAVEL APP

Description

This docker script is optimized for a development environment and implements the following technologies for a Laravel app:

  • Php 7.4
  • Nginx
  • MySql
  • PhpMyadmin
  • Mailhog

STEPS TO BUILD THE APP

  1. Set the .env variables

    #!/bin/bash
    cp .env.example
  2. Build the images

    #!/bin/bash
    docker-compose build
  3. Start containers

    #!/bin/bash
    docker-compose up -d
  4. Install dependencies inside containser

    #!/bin/bash
    docker-compose exec app composer install
  5. Set app key

    #!/bin/bash
    docker-compose exec app php artisan key:generate
  6. Run migrations

    #!/bin/bash
    docker-compose exec app php artisan migrate
  7. Browse at

    http://localhost:80

NOTES:

  • Enter the main container
#!/bin/bash
docker-compose exec app bash

Regards

Roberth Rodriguez, Laravel the web artisan

About

Docker for development for a Laravel app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages