Skip to content

Laravel guide

Jose Gracia Berenguer edited this page Apr 9, 2020 · 1 revision

Laravel installation with the 'Docker Skeleton LEMP' environment!

  1. Clone the repository:

    git clone https://github.com/Josee9988/Docker-Skeleton-LEMP.git

clone the repo

  1. Go to the cloned project directory:

    cd Docker-Skeleton-LEMP

go to project

  1. Modify the .env environment variables as you please.

Modify the .env environment variables as you please.

  1. Build the container

    docker-compose up -d

Build and test the container is successfully working

  1. Test the container is working

test the container

test the container

  1. Create the Laravel application

Laravel official installation guide

```bash
composer create-project --prefer-dist laravel/laravel myLaravelProjectName
```
  1. Move the Laravel files to the main directory (as the Laravel app would have been created inside a directory and we want these files in the actual one, not inside a folder)

    cp myLaravelProjectName/. . -R

extract files

  1. Copy the .env configuration in the new .env file.

extract files

  1. Test to run any command inside the container.
docker exec -it skeletonApp-phpfpm bash # the name depends on the .env variable 'APPLICATION_NAME'

test command

  1. Enjoy

test command

Clone this wiki locally