Skip to content

Easy2-Dev/Docker-for-Laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Easy2-Dev Docker-for-Laravel

This is a Docker-based environment configured for Laravel development.

πŸš€ Elaborating on the intended purpose

This solution enables the streamlined creation of Laravel projects without any additional prerequisites. The requirements are that Docker, Docker Compose, Git, and Make be installed on your machine.

🧩 Requirements

  • git
  • make
  • docker
  • docker-compose

πŸ“œ Instructions for configuring

  1. Prior to proceeding, clone this repository. HTTPS

    git clone https://github.com/Easy2-Dev/Docker-for-Laravel.git 
    

    OR

    SSH

    git clone git@github.com:Easy2-Dev/Docker-for-Laravel.git
    

  1. After completing the cloning process, you can either initiate a new project from within the cloned directory or associate an existing project situated outside of the directory.

    $\mathcal{\color{teal} \text{\Large{if}} }$ cloned directory :

    # Simply execute the make app command.

    make app && make up
    

    $\mathcal{\color{teal} \text{\Large{else}} }$ :

    # Modification of the two directory paths depicted below in the .env file is required.

    APP_VOLUMES_SRC=./src/
    STATIC_VOLUMES_PUBLIC=./src/public/

    The two paths presented here necessitate that you indicate the path to your project instead.

    APP_VOLUMES_SRC= <your project path>/
    STATIC_VOLUMES_PUBLIC= <your project path>/public/
    

    Once you have finished making the modification, you may execute the make up command.

    make up
    

πŸ”– ENV Explanation

.env

APP_IMAGE=app
APP_VOLUMES_SRC=./src/
STATIC_VOLUMES_PUBLIC=./src/public/
SERVER_SRC = ./nginx/default.conf
MYSQL_PORT=3307
NGINX_PORT=8000
DB_MANAGER_PORT=8001
UID=1000

Variable Description
APP_IMAGE data2
APP_VOLUMES_SRC data12
STATIC_VOLUMES_PUBLIC data12
MYSQL_PORT data12
NGINX_PORT data12
DB_MANAGER_PORT data12

adminer.env

ADMINER_DEFAULT_SERVER=db

Variable Description
ADMINER_DEFAULT_SERVER data2

app.env

DB_CONNECTION=mysql
DB_HOST=db
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=root

Variable Description
DB_CONNECTION data2
DB_HOST data12
DB_PORT data12
DB_DATABASE data12
DB_USERNAME data12
DB_PASSWORD data12

mysql.env

MYSQL_ROOT_PASSWORD=root
MYSQL_DATABASE=laravel

Variable Description
MYSQL_ROOT_PASSWORD data2
MYSQL_DATABASE data12