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`.
42
+
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)*
41
45
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)_
43
46
44
47
Your folder structure should look like this:
45
48
@@ -50,13 +53,12 @@ Your folder structure should look like this:
50
53
+ laradock-b
51
54
```
52
55
53
-
_(It's important to rename the laradock folders to unique name in each project, if you want to run laradock per project)._
56
+
*(It's important to rename the laradock folders to unique name in each project, if you want to run laradock per project).*
54
57
55
58
> **Now jump to the [Usage](#Usage) section.**
56
59
57
-
[]()
58
-
59
-
## A.2) Don't have a PHP project yet:
60
+
<aname="A2"></a>
61
+
### A.2) Don't have a PHP project yet:
60
62
61
63
1 - Clone this repository anywhere on your machine:
62
64
@@ -89,13 +91,12 @@ Make sure to replace `project-z` with your project folder name.
89
91
90
92
> **Now jump to the [Usage](#Usage) section.**
91
93
92
-
[]()
93
-
94
-
## B) Setup for Multiple Projects:
95
94
95
+
<aname="B"></a>
96
+
### B) Setup for Multiple Projects:
96
97
> (Follow these steps if you want a single Docker environment for all your project)
97
98
98
-
1 - Clone this repository anywhere on your machine (similar to [Steps A.2\. from above](#A2)):
99
+
1 - Clone this repository anywhere on your machine (similar to [Steps A.2. from above](#A2)):
@@ -126,20 +127,25 @@ You can rename the config files, project folders and domains as you like, just m
126
127
127
128
> **Now jump to the [Usage](#Usage) section.**
128
129
129
-
[]()
130
130
131
-
# Usage
131
+
132
+
133
+
134
+
135
+
136
+
<aname="Usage"></a>
137
+
## Usage
132
138
133
139
**Read Before starting:**
134
140
135
141
If you are using **Docker Toolbox** (VM), do one of the following:
136
142
137
143
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock)
138
-
- Use Laradock v3.*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. _(outdated)_
144
+
- Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. *(outdated)*
139
145
140
146
<br>
141
147
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.
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.
143
149
144
150
<br>
145
151
@@ -151,6 +157,7 @@ cp env-example .env
151
157
152
158
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.
153
159
160
+
154
161
2 - Build the enviroment and run it using `docker-compose`
155
162
156
163
In this example we'll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:
@@ -161,9 +168,11 @@ docker-compose up -d nginx mysql
161
168
162
169
**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`.
163
170
171
+
164
172
You can select your own combination of containers form [this list](http://laradock.io/introduction/#supported-software-images).
165
173
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)._
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
+
167
176
168
177
<br>
169
178
3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...)
@@ -172,19 +181,19 @@ _(Please note that sometimes we forget to update the docs, so check the `docker-
172
181
docker-compose exec workspace bash
173
182
```
174
183
175
-
_Alternatively, for Windows PowerShell users: execute the following command to enter any running container:_
184
+
*Alternatively, for Windows PowerShell users: execute the following command to enter any running container:*
176
185
177
186
```bash
178
187
docker exec -it {workspace-container-id} bash
179
188
```
180
189
181
-
**Note:** You can add `--user=laradock` to have files created as your host's user. Example:
190
+
**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)_
196
+
*You can change the PUID (User id) and PGID (group id) variables from the `.env` file)*
188
197
189
198
<br>
190
199
4 - Update your project configurations to use the database host
@@ -195,7 +204,9 @@ Open your PHP project's `.env` file or whichever configuration file you are read
195
204
DB_HOST=mysql
196
205
```
197
206
198
-
_If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel)._
207
+
*If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
199
208
200
209
<br>
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
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
0 commit comments