You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>These commands should create a `docker` folder, on the root directory of your Laravel project.
175
+
2 - Go to the Uage section below and do the steps 1 and 3 then come back here.
176
+
177
+
3 - Enter the Workspace container. (assuming you have the Workspace container running):
178
+
179
+
```bash
180
+
docker exec -it {Workspace-Container-Name} bash
181
+
```
182
+
Replace `{Workspace-Container-Name}` with your Workspace container name. To get the name type `docker-compose ps` and copy it.
183
+
184
+
4 - Install Laravel anyway you like.
185
+
186
+
Example using the Laravel Installer:
187
+
188
+
```bash
189
+
laravel new my-cool-app
190
+
```
191
+
For more about this check out this [link](https://laravel.com/docs/master#installing-laravel).
192
+
193
+
5 - Edit `docker-compose.yml` to Map the new application path:
194
+
195
+
By default LaraDock assumes the Laravel application is living in the parent directory of the laradock folder.
196
+
197
+
Since the new Laravel application is in the `my-cool-app` folder, we should replace `../:/var/www/laravel` with `../my-cool-app/:/var/www/laravel`, as follow:
198
+
199
+
```yaml
200
+
application:
201
+
build: ./application
202
+
volumes:
203
+
- ../my-cool-app/:/var/www/laravel
204
+
```
205
+
6 - Finallt go to the Usage section below again and do steps 2 and 4.
164
206
165
207
166
208
167
209
168
210
<a name="Usage"></a>
169
211
## Usage
170
212
171
-
0 - For **Windows & MAC** users only: make sure you have a running Docker Virtual Host on your machine.
213
+
1 - For **Windows & MAC** users only: make sure you have a running Docker Virtual Host on your machine.
172
214
(**Linux** users don't need a Virtual Host, so skip this step).
173
215
<br>
174
216
[How to run a Docker Virtual Host?](#Run-Docker-Virtual-Host)
175
217
176
218
177
219
<br>
178
-
1 - Open your Laravel's `.env` file and set the `DB_HOST` to your `{Docker-IP}`:
220
+
2 - Open your Laravel's `.env` file and set the `DB_HOST` to your `{Docker-IP}`:
179
221
180
222
```env
181
223
DB_HOST=xxx.xxx.xxx.xxx
182
224
```
183
225
[How to find my Docker IP Address?](#Find-Docker-IP-Address)
184
226
185
227
<br>
186
-
2 - Run the Containers, (you can select the software's (containers) that you wish to run)
228
+
3 - Run the Containers, (you can select the software's (containers) that you wish to run)
187
229
<br>
188
-
*Make sure you are in the `docker` folder before running the `docker-compose` command.*
230
+
*Make sure you are in the `laradock` folder before running the `docker-compose` command.*
189
231
190
-
**Example:** Running NGINX, MySQL, Redis and the workspace:
232
+
**Example:** Running NGINX, MySQL, Redis and the Workspace:
191
233
192
234
```bash
193
-
docker-compose up -d nginx mysql redis Workspace
235
+
docker-compose up -d nginx mysql redis workspace
194
236
```
195
237
*Note: the PHP-FPM, Application and Data Containers will automatically run.*
0 commit comments