Skip to content

Commit

Permalink
v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sachintha00 committed Apr 1, 2023
2 parents 376d367 + 2001eba commit 1d1a4c3
Show file tree
Hide file tree
Showing 4 changed files with 162 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**/*.env
# volumes
# src
volumes
src
!**/temp*.env
159 changes: 158 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,158 @@
# Docker-for-Laravel
# 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 only requirement is that Docker be installed on your machine.


### 馃З Requirements
- `git`
- `make`
- `docker`
- `docker-compose`

## 馃摐 Instructions for configuring

01. 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
```
<br />

02. 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.
<br />

## $\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.
https://github.com/Easy2-Dev/Docker-for-Laravel/blob/376d367eef01d574b4f4ca62a47f1e93158baf74/temp.env#L3-L4

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

```shell
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
https://github.com/Easy2-Dev/Docker-for-Laravel/blob/0d34455fd4a94a40c2d1a16b5ac025b04bec3a9a/temp.env#L1-L12

<table>
<thead>
<tr>
<th>Variable</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>data1</td>
<td>data2</td>
</tr>
<tr>
<td>data11</td>
<td>data12</td>
</tr>
</tbody>
</table>


### adminer.env
https://github.com/Easy2-Dev/Docker-for-Laravel/blob/34afb556d2b45b264ae71840c5f3a8aa5b9404d6/envs/temp.adminer.env#L1

<table>
<thead>
<tr>
<th>Variable</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>ADMINER_DEFAULT_SERVER</td>
<td>data2</td>
</tr>
</tbody>
</table>


### app.env
https://github.com/Easy2-Dev/Docker-for-Laravel/blob/34afb556d2b45b264ae71840c5f3a8aa5b9404d6/envs/temp.app.env#L1-L58

<table>
<thead>
<tr>
<th>Variable</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>DB_CONNECTION</td>
<td>data2</td>
</tr>
<tr>
<td>DB_HOST</td>
<td>data12</td>
</tr>
<tr>
<td>DB_PORT</td>
<td>data12</td>
</tr>
<tr>
<td>DB_DATABASE</td>
<td>data12</td>
</tr>
<tr>
<td>DB_USERNAME</td>
<td>data12</td>
</tr>
<tr>
<td>DB_PASSWORD</td>
<td>data12</td>
</tr>
</tbody>
</table>


### mysql.env
https://github.com/Easy2-Dev/Docker-for-Laravel/blob/34afb556d2b45b264ae71840c5f3a8aa5b9404d6/envs/temp.mysql.env#L1-L2

<table>
<thead>
<tr>
<th>Variable</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>MYSQL_ROOT_PASSWORD</td>
<td>data2</td>
</tr>
<tr>
<td>MYSQL_DATABASE</td>
<td>data12</td>
</tr>
</tbody>
</table>
2 changes: 1 addition & 1 deletion envs/temp.app.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=192.168.43.216
DB_HOST=db
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
Expand Down
2 changes: 1 addition & 1 deletion temp.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
APP_IMAGE=app

APP_VOLUMES_SRC=./src/
STATIC_VOLUMES_PUBLIC=../public/
STATIC_VOLUMES_PUBLIC=./src/public/
SERVER_SRC = ./nginx/default.conf

MYSQL_PORT=3307
Expand Down

0 comments on commit 1d1a4c3

Please sign in to comment.