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
Note: If you are not using Git yet for your project, you can use `git clone` instead of `git submodule `.
43
-
44
-
*To keep track of your Laradock changes, between your projects and also keep Laradock updated [check these docs](/documentation/#keep-track-of-your-laradock-changes)*
40
+
Note: If you are not using Git yet for your project, you can use `git clone` instead of `git submodule`.
45
41
42
+
_To keep track of your Laradock changes, between your projects and also keep Laradock updated [check these docs](/documentation/#keep-track-of-your-laradock-changes)_
46
43
47
44
Your folder structure should look like this:
48
45
@@ -53,12 +50,13 @@ Your folder structure should look like this:
53
50
+ laradock-b
54
51
```
55
52
56
-
*(It's important to rename the laradock folders to unique name in each project, if you want to run laradock per project).*
53
+
_(It's important to rename the laradock folders to unique name in each project, if you want to run laradock per project)._
57
54
58
55
> **Now jump to the [Usage](#Usage) section.**
59
56
60
-
<aname="A2"></a>
61
-
### A.2) Don't have a PHP project yet:
57
+
[]()
58
+
59
+
## A.2) Don't have a PHP project yet:
62
60
63
61
1 - Clone this repository anywhere on your machine:
64
62
@@ -84,19 +82,20 @@ cp env-example .env
84
82
At the top, change the `APPLICATION` variable to your project path.
85
83
86
84
```
87
-
APPLICATION=../project-z/public/
85
+
APPLICATION=../project-z/
88
86
```
89
87
90
88
Make sure to replace `project-z` with your project folder name.
91
89
92
90
> **Now jump to the [Usage](#Usage) section.**
93
91
92
+
[]()
93
+
94
+
## B) Setup for Multiple Projects:
94
95
95
-
<aname="B"></a>
96
-
### B) Setup for Multiple Projects:
97
96
> (Follow these steps if you want a single Docker environment for all your project)
98
97
99
-
1 - Clone this repository anywhere on your machine (similar to [Steps A.2. from above](#A2)):
98
+
1 - Clone this repository anywhere on your machine (similar to [Steps A.2\. from above](#A2)):
@@ -127,25 +126,20 @@ You can rename the config files, project folders and domains as you like, just m
127
126
128
127
> **Now jump to the [Usage](#Usage) section.**
129
128
129
+
[]()
130
130
131
-
132
-
133
-
134
-
135
-
136
-
<aname="Usage"></a>
137
-
## Usage
131
+
# Usage
138
132
139
133
**Read Before starting:**
140
134
141
135
If you are using **Docker Toolbox** (VM), do one of the following:
142
136
143
137
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock)
144
-
- Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. *(outdated)*
138
+
- Use Laradock v3.*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. _(outdated)_
145
139
146
140
<br>
147
141
148
-
>**Warning:** If you used an older version of Laradock it's highly recommended to rebuild the containers you need to use [see how you rebuild a container](#Build-Re-build-Containers) in order to prevent as much errors as possible.
142
+
>**Warning:** If you used an older version of Laradock it's highly recommended to rebuild the containers you need to use [see how you rebuild a container](#Build-Re-build-Containers) in order to prevent as much errors as possible.
149
143
150
144
<br>
151
145
@@ -157,7 +151,6 @@ cp env-example .env
157
151
158
152
You can edit the `.env` file to chose which software's you want to be installed in your environment. You can always refer to the `docker-compose.yml` file to see how those variables are been used.
159
153
160
-
161
154
2 - Build the enviroment and run it using `docker-compose`
162
155
163
156
In this example we'll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:
@@ -168,11 +161,9 @@ docker-compose up -d nginx mysql
168
161
169
162
**Note**: The `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command. If you couldn't find them running then you need specify them as follow: `docker-compose up -d nginx php-fpm mysql workspace`.
170
163
171
-
172
164
You can select your own combination of containers form [this list](http://laradock.io/introduction/#supported-software-images).
173
165
174
-
*(Please note that sometimes we forget to update the docs, so check the `docker-compose.yml` file to see an updated list of all available containers).*
175
-
166
+
_(Please note that sometimes we forget to update the docs, so check the `docker-compose.yml` file to see an updated list of all available containers)._
176
167
177
168
<br>
178
169
3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...)
@@ -181,19 +172,19 @@ You can select your own combination of containers form [this list](http://larado
181
172
docker-compose exec workspace bash
182
173
```
183
174
184
-
*Alternatively, for Windows PowerShell users: execute the following command to enter any running container:*
175
+
_Alternatively, for Windows PowerShell users: execute the following command to enter any running container:_
185
176
186
177
```bash
187
178
docker exec -it {workspace-container-id} bash
188
179
```
189
180
190
-
**Note:** You can add `--user=laradock` to have files created as your host's user. Example:
181
+
**Note:** You can add `--user=laradock` to have files created as your host's user. Example:
*You can change the PUID (User id) and PGID (group id) variables from the `.env` file)*
187
+
_You can change the PUID (User id) and PGID (group id) variables from the `.env` file)_
197
188
198
189
<br>
199
190
4 - Update your project configurations to use the database host
@@ -204,9 +195,7 @@ Open your PHP project's `.env` file or whichever configuration file you are read
204
195
DB_HOST=mysql
205
196
```
206
197
207
-
*If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
198
+
_If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel)._
208
199
209
200
<br>
210
-
5 - Open your browser and visit your localhost address `http://localhost/`. If you followed the multiple projects setup, you can visit `http://project-1.dev/` and `http://project-2.dev/`. But first don't
211
-
212
-
201
+
5 - Open your browser and visit your localhost address `http://localhost/`. If you followed the multiple projects setup, you can visit `http://project-1.dev/` and `http://project-2.dev/`. But first don't
0 commit comments