|
1 |
| -# Docker-for-Laravel |
| 1 | +# Easy2-Dev Docker-for-Laravel |
| 2 | + |
| 3 | +This is a Docker-based environment configured for Laravel development. |
| 4 | + |
| 5 | + |
| 6 | +## 🚀 Elaborating on the intended purpose |
| 7 | +This solution enables the streamlined creation of Laravel projects without any additional prerequisites. The only requirement is that Docker be installed on your machine. |
| 8 | + |
| 9 | + |
| 10 | +### 🧩 Requirements |
| 11 | +- `git` |
| 12 | +- `make` |
| 13 | +- `docker` |
| 14 | +- `docker-compose` |
| 15 | + |
| 16 | +## 📜 Instructions for configuring |
| 17 | + |
| 18 | +01. Prior to proceeding, clone this repository. |
| 19 | + **HTTPS** |
| 20 | + ``` |
| 21 | + git clone https://github.com/Easy2-Dev/Docker-for-Laravel.git |
| 22 | + ``` |
| 23 | + ### `OR` |
| 24 | +
|
| 25 | + **SSH** |
| 26 | + ``` |
| 27 | + git clone [email protected]:Easy2-Dev/Docker-for-Laravel.git |
| 28 | + ``` |
| 29 | +<br /> |
| 30 | +
|
| 31 | +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. |
| 32 | + <br /> |
| 33 | +
|
| 34 | + ## $\mathcal{\color{teal} \text{\Large{if}} }$ **cloned directory** : |
| 35 | + \# Simply execute the make app command. |
| 36 | +
|
| 37 | + make app && make up |
| 38 | +
|
| 39 | + ## $\mathcal{\color{teal} \text{\Large{else}} }$ : |
| 40 | + \# Modification of the two directory paths depicted below in the `.env` file is required. |
| 41 | + https://github.com/Easy2-Dev/Docker-for-Laravel/blob/376d367eef01d574b4f4ca62a47f1e93158baf74/temp.env#L3-L4 |
| 42 | + |
| 43 | + The two paths presented here necessitate that you indicate the path to your project instead. |
| 44 | + |
| 45 | + ```shell |
| 46 | + APP_VOLUMES_SRC= <your project path>/ |
| 47 | + STATIC_VOLUMES_PUBLIC= <your project path>/public/ |
| 48 | + ``` |
| 49 | + Once you have finished making the modification, you may execute the `make up` command. |
| 50 | +
|
| 51 | + ``` |
| 52 | + make up |
| 53 | + ``` |
| 54 | +
|
| 55 | +## 🔖 ENV Explanation |
| 56 | +
|
| 57 | +### .env |
| 58 | + https://github.com/Easy2-Dev/Docker-for-Laravel/blob/0d34455fd4a94a40c2d1a16b5ac025b04bec3a9a/temp.env#L1-L12 |
| 59 | + |
| 60 | + <table> |
| 61 | + <thead> |
| 62 | + <tr> |
| 63 | + <th>Variable</th> |
| 64 | + <th>Description</th> |
| 65 | + </tr> |
| 66 | + </thead> |
| 67 | + <tbody> |
| 68 | + <tr> |
| 69 | + <td>data1</td> |
| 70 | + <td>data2</td> |
| 71 | + </tr> |
| 72 | + <tr> |
| 73 | + <td>data11</td> |
| 74 | + <td>data12</td> |
| 75 | + </tr> |
| 76 | + </tbody> |
| 77 | + </table> |
| 78 | + |
| 79 | + |
| 80 | +### adminer.env |
| 81 | + https://github.com/Easy2-Dev/Docker-for-Laravel/blob/34afb556d2b45b264ae71840c5f3a8aa5b9404d6/envs/temp.adminer.env#L1 |
| 82 | + |
| 83 | + <table> |
| 84 | + <thead> |
| 85 | + <tr> |
| 86 | + <th>Variable</th> |
| 87 | + <th>Description</th> |
| 88 | + </tr> |
| 89 | + </thead> |
| 90 | + <tbody> |
| 91 | + <tr> |
| 92 | + <td>ADMINER_DEFAULT_SERVER</td> |
| 93 | + <td>data2</td> |
| 94 | + </tr> |
| 95 | + </tbody> |
| 96 | + </table> |
| 97 | + |
| 98 | + |
| 99 | + ### app.env |
| 100 | + https://github.com/Easy2-Dev/Docker-for-Laravel/blob/34afb556d2b45b264ae71840c5f3a8aa5b9404d6/envs/temp.app.env#L1-L58 |
| 101 | + |
| 102 | + <table> |
| 103 | + <thead> |
| 104 | + <tr> |
| 105 | + <th>Variable</th> |
| 106 | + <th>Description</th> |
| 107 | + </tr> |
| 108 | + </thead> |
| 109 | + <tbody> |
| 110 | + <tr> |
| 111 | + <td>DB_CONNECTION</td> |
| 112 | + <td>data2</td> |
| 113 | + </tr> |
| 114 | + <tr> |
| 115 | + <td>DB_HOST</td> |
| 116 | + <td>data12</td> |
| 117 | + </tr> |
| 118 | + <tr> |
| 119 | + <td>DB_PORT</td> |
| 120 | + <td>data12</td> |
| 121 | + </tr> |
| 122 | + <tr> |
| 123 | + <td>DB_DATABASE</td> |
| 124 | + <td>data12</td> |
| 125 | + </tr> |
| 126 | + <tr> |
| 127 | + <td>DB_USERNAME</td> |
| 128 | + <td>data12</td> |
| 129 | + </tr> |
| 130 | + <tr> |
| 131 | + <td>DB_PASSWORD</td> |
| 132 | + <td>data12</td> |
| 133 | + </tr> |
| 134 | + </tbody> |
| 135 | + </table> |
| 136 | + |
| 137 | + |
| 138 | + ### mysql.env |
| 139 | + https://github.com/Easy2-Dev/Docker-for-Laravel/blob/34afb556d2b45b264ae71840c5f3a8aa5b9404d6/envs/temp.mysql.env#L1-L2 |
| 140 | + |
| 141 | + <table> |
| 142 | + <thead> |
| 143 | + <tr> |
| 144 | + <th>Variable</th> |
| 145 | + <th>Description</th> |
| 146 | + </tr> |
| 147 | + </thead> |
| 148 | + <tbody> |
| 149 | + <tr> |
| 150 | + <td>MYSQL_ROOT_PASSWORD</td> |
| 151 | + <td>data2</td> |
| 152 | + </tr> |
| 153 | + <tr> |
| 154 | + <td>MYSQL_DATABASE</td> |
| 155 | + <td>data12</td> |
| 156 | + </tr> |
| 157 | + </tbody> |
| 158 | + </table> |
0 commit comments