Reverting unintended MD formatting
This commit is contained in:
@ -4,32 +4,34 @@ type: index
|
||||
weight: 2
|
||||
---
|
||||
|
||||
# Requirements
|
||||
## Requirements
|
||||
|
||||
- [Git](https://git-scm.com/downloads)
|
||||
- [Docker](https://www.docker.com/products/docker/) `>= 1.12`
|
||||
|
||||
# Installation
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
Choose the setup the best suits your needs.
|
||||
|
||||
- [A) Setup for Single Project](#A)
|
||||
|
||||
- [A.1) Already have a PHP project](#A1)
|
||||
|
||||
- [A.2) Don't have a PHP project yet](#A2)
|
||||
|
||||
- [A.1) Already have a PHP project](#A1)
|
||||
- [A.2) Don't have a PHP project yet](#A2)
|
||||
- [B) Setup for Multiple Projects](#B)
|
||||
|
||||
[]()
|
||||
|
||||
## A) Setup for Single Project
|
||||
|
||||
<a name="A"></a>
|
||||
### A) Setup for Single Project
|
||||
> (Follow these steps if you want a separate Docker environment for each project)
|
||||
|
||||
[]()
|
||||
|
||||
## A.1) Already have a PHP project:
|
||||
<a name="A1"></a>
|
||||
### A.1) Already have a PHP project:
|
||||
|
||||
1 - Clone laradock on your project root directory:
|
||||
|
||||
@ -37,9 +39,10 @@ Choose the setup the best suits your needs.
|
||||
git submodule add https://github.com/Laradock/laradock.git
|
||||
```
|
||||
|
||||
Note: If you are not using Git yet for your project, you can use `git clone` instead of `git submodule`.
|
||||
Note: If you are not using Git yet for your project, you can use `git clone` instead of `git submodule `.
|
||||
|
||||
*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)*
|
||||
|
||||
_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)_
|
||||
|
||||
Your folder structure should look like this:
|
||||
|
||||
@ -50,13 +53,12 @@ Your folder structure should look like this:
|
||||
+ laradock-b
|
||||
```
|
||||
|
||||
_(It's important to rename the laradock folders to unique name in each project, if you want to run laradock per project)._
|
||||
*(It's important to rename the laradock folders to unique name in each project, if you want to run laradock per project).*
|
||||
|
||||
> **Now jump to the [Usage](#Usage) section.**
|
||||
|
||||
[]()
|
||||
|
||||
## A.2) Don't have a PHP project yet:
|
||||
<a name="A2"></a>
|
||||
### A.2) Don't have a PHP project yet:
|
||||
|
||||
1 - Clone this repository anywhere on your machine:
|
||||
|
||||
@ -89,13 +91,12 @@ Make sure to replace `project-z` with your project folder name.
|
||||
|
||||
> **Now jump to the [Usage](#Usage) section.**
|
||||
|
||||
[]()
|
||||
|
||||
## B) Setup for Multiple Projects:
|
||||
|
||||
<a name="B"></a>
|
||||
### B) Setup for Multiple Projects:
|
||||
> (Follow these steps if you want a single Docker environment for all your project)
|
||||
|
||||
1 - Clone this repository anywhere on your machine (similar to [Steps A.2\. from above](#A2)):
|
||||
1 - Clone this repository anywhere on your machine (similar to [Steps A.2. from above](#A2)):
|
||||
|
||||
```bash
|
||||
git clone https://github.com/laradock/laradock.git
|
||||
@ -126,20 +127,25 @@ You can rename the config files, project folders and domains as you like, just m
|
||||
|
||||
> **Now jump to the [Usage](#Usage) section.**
|
||||
|
||||
[]()
|
||||
|
||||
# Usage
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="Usage"></a>
|
||||
## Usage
|
||||
|
||||
**Read Before starting:**
|
||||
|
||||
If you are using **Docker Toolbox** (VM), do one of the following:
|
||||
|
||||
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock)
|
||||
- Use Laradock v3.*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. _(outdated)_
|
||||
- Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. *(outdated)*
|
||||
|
||||
<br>
|
||||
|
||||
> **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.
|
||||
>**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.
|
||||
|
||||
<br>
|
||||
|
||||
@ -151,6 +157,7 @@ cp env-example .env
|
||||
|
||||
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.
|
||||
|
||||
|
||||
2 - Build the enviroment and run it using `docker-compose`
|
||||
|
||||
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
|
||||
|
||||
**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`.
|
||||
|
||||
|
||||
You can select your own combination of containers form [this list](http://laradock.io/introduction/#supported-software-images).
|
||||
|
||||
_(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)._
|
||||
*(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).*
|
||||
|
||||
|
||||
<br>
|
||||
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-
|
||||
docker-compose exec workspace bash
|
||||
```
|
||||
|
||||
_Alternatively, for Windows PowerShell users: execute the following command to enter any running container:_
|
||||
*Alternatively, for Windows PowerShell users: execute the following command to enter any running container:*
|
||||
|
||||
```bash
|
||||
docker exec -it {workspace-container-id} bash
|
||||
```
|
||||
|
||||
**Note:** You can add `--user=laradock` to have files created as your host's user. Example:
|
||||
**Note:** You can add `--user=laradock` to have files created as your host's user. Example:
|
||||
|
||||
```shell
|
||||
docker-compose exec --user=laradock workspace bash
|
||||
```
|
||||
|
||||
_You can change the PUID (User id) and PGID (group id) variables from the `.env` file)_
|
||||
*You can change the PUID (User id) and PGID (group id) variables from the `.env` file)*
|
||||
|
||||
<br>
|
||||
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
|
||||
DB_HOST=mysql
|
||||
```
|
||||
|
||||
_If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel)._
|
||||
*If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
|
||||
|
||||
<br>
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user