diff --git a/.env b/.env
deleted file mode 100644
index accd09a0..00000000
--- a/.env
+++ /dev/null
@@ -1 +0,0 @@
-COMPOSE_CONVERT_WINDOWS_PATHS=1
diff --git a/.gitignore b/.gitignore
index 7c6f11b7..b3403af6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
.idea
/logs
/data
+.env
\ No newline at end of file
diff --git a/docs/_settings/config.toml b/DOCUMENTATION/_settings/config.toml
similarity index 98%
rename from docs/_settings/config.toml
rename to DOCUMENTATION/_settings/config.toml
index d204953d..90b5b535 100644
--- a/docs/_settings/config.toml
+++ b/DOCUMENTATION/_settings/config.toml
@@ -1,6 +1,6 @@
baseurl = "http://laradock.io/"
languageCode = "en-us"
-publishDir = "../"
+publishDir = "../../docs"
title = "Laradock"
theme = "hugo-material-docs"
metadataformat = "yaml"
diff --git a/docs/_settings/content/contributing/index.md b/DOCUMENTATION/_settings/content/contributing/index.md
similarity index 56%
rename from docs/_settings/content/contributing/index.md
rename to DOCUMENTATION/_settings/content/contributing/index.md
index 4631aa7a..f3b67b75 100644
--- a/docs/_settings/content/contributing/index.md
+++ b/DOCUMENTATION/_settings/content/contributing/index.md
@@ -7,41 +7,53 @@ weight: 6
Your contribution is more than welcome.
-## Got a Question or Problem?
+## I have a Question/Problem
-If you have questions about how to use LaraDock, please direct your questions to the discussion on [Gitter](https://gitter.im/LaraDock/laradock). If you believe your question could help others, then consider opening an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Question).
+If you have questions about how to use Laradock, please direct your questions to the discussion on [Gitter](https://gitter.im/Laradock/laradock). If you believe your question could help others, then consider opening an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as `Question`) And you can still seek help on Gitter for it.
-## Found an Issue?
-If you find a bug in the source code or a mistake in the documentation, you can help us by
-submitting an [Issue](https://github.com/laradock/laradock/issues). Even better you can submit a Pull Request with a fix.
+## I found an Issue
+If have an issue or you found a typo in the documentation, you can help us by
+opnening an [Issue](https://github.com/laradock/laradock/issues).
-## Want a Feature?
-You can request a new feature by submitting an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Feature Suggestion). If you would like to implement a new feature then consider submitting a Pull Request.
+**Steps to do before opening an Issue:**
+
+1. Before you submit your issue search the archive, maybe your question was already answered couple hours ago (search in the closed Issues as well).
+
+2. Decide if the Issue belongs to this project or to [Docker](https://github.com/docker) itself! or even the tool you are using such as Nginx or MongoDB...
+
+If your issue appears to be a bug, and hasn't been reported, then open a new issue.
+
+*This Help us to maximize the effort we can spend fixing issues and adding new
+features, by not reporting duplicate issues.*
-## Update Documentation (Site)
+## I want a Feature
+You can request a new feature by submitting an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as `Feature Suggestion`). If you would like to implement a new feature then consider submitting a Pull Request yourself.
+
+
+
+
+
+## I want to update the Documentation (Site)
Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Material Docs theme](http://themes.gohugo.io/theme/material-docs/). You might need to check their docs quickly.
-1. Install [Hugo](https://gohugo.io/) on your machine.
-2. Clone laradock.
-3. Go to `/docs`.
-4. Delete everything except the `_settings` folder & the `CNAME` file.
-5. Open `docs/_settings` from your terminal and run `hugo serve` to host the website locally.
-6. Open the `docs/_settings/content` and search for the folder of the section you want to edit.
-7. In each section there's an `index.md` file, that's the file you need to edit.
-8. To edit the sidebar (in case you are adding new section) go to `docs/_settings/config.toml` and add the section there.
-9. After done editing, run the this command `hugo` to generate the updated site inside the `docs` folder.
-10. Go back to the project root directory, commit and push..
+1. Install [Hugo](https://gohugo.io/) on your machine (easy thing).
+2. Open the `DOCUMENTATION/_settings/content` and search for the markdown file you want to edit (every folder represents a section in the menu).
+3. Delete the `/docs` folder from the root.
+4. When you finish editing, run the `hugo` command to generate the HTML docs (in the `/docs`).
+
+### To Host the website locally
+Go to `DOCUMENTATION/_settings` in your terminal and run `hugo serve` to host the website locally.
+
+### Edit the sidebar
+To add a new section to the sidebar or edit existing one, you need to edit this file `DOCUMENTATION/_settings/config.toml`.
-
-## Coding Guidelines
-
-## Support new Software
+## How to support new Software (Add new Container)
* Create folder with the software name.
@@ -53,30 +65,23 @@ Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Ma
* Make sure you follow our commenting style.
-* Add the software in the `Readme`.
+* Add the software in the `Documentation`.
-## Edit existing Software
+## Edit existing Software (Edit a Container)
* Open the software (container) folder.
* Edit the files you want to update.
* **Note:** If you want to edit the base image of the `Workspace` or the `php-fpm` Containers,
-you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the LaraDock repository.
+you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the Laradock repository.
-* Make sure to update the `Readme` in case you made any changes.
-
-## Issue/PR Submission Guidelines
-
-## Submitting an Issue
-Before you submit your issue search the archive, maybe your question was already answered.
-
-If your issue appears to be a bug, and hasn't been reported, open a new issue.
-Help us to maximize the effort we can spend fixing issues and adding new
-features, by not reporting duplicate issues.
+* Make sure to update the `Documentation` in case you made any changes.
-## Before Submitting a Pull Request (PR)
+## Pull Request
+
+### 1. Before Submitting a Pull Request (PR)
Always Test everything and make sure its working:
@@ -86,13 +91,13 @@ Always Test everything and make sure its working:
- Test running the container with some other containers in real app and see of everything is working fine.
- Now edit the container (edit section by section and test rebuilding the container after every edited section)
- Testing building the container (docker-compose build container-name) with no errors.
- - Test it in real App.
+ - Test it in a real App if possible.
-## Submitting a PR
+### 2. Submitting a PR
Consider the following guidelines:
-* Search [GitHub](https://github.com/laradock/laradock/pulls) for an open or closed Pull Request that relates to your submission. You don't want to duplicate effort.
+* Search [GitHub](https://github.com/laradock/laradock/pulls) for an open or closed Pull Request that relates to your submission. You don't want to duplicate efforts.
* Make your changes in a new git branch:
@@ -123,14 +128,9 @@ git push origin my-fix-branch -f
*WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.*
+### 3. After your PR is merged
-
-
-
-## After your PR is merged
-
-After your pull request is merged, you can safely delete your branch and pull the changes
-from the main (upstream) repository:
+After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
@@ -161,4 +161,4 @@ from the main (upstream) repository:
-## Happy Coding :)
+#### Happy Coding :)
diff --git a/docs/_settings/content/documentation/index.md b/DOCUMENTATION/_settings/content/documentation/index.md
similarity index 96%
rename from docs/_settings/content/documentation/index.md
rename to DOCUMENTATION/_settings/content/documentation/index.md
index f8785f81..7d4addc9 100644
--- a/docs/_settings/content/documentation/index.md
+++ b/DOCUMENTATION/_settings/content/documentation/index.md
@@ -176,6 +176,11 @@ However to view the logs of all the other containers (MySQL, PHP-FPM,...) you ca
docker logs {container-name}
```
+More [options](https://docs.docker.com/compose/reference/logs/)
+
+```bash
+docker logs -f {container-name}
+```
@@ -329,7 +334,7 @@ For information on how to configure xDebug with your IDE and work it out, check
By installing xDebug, you are enabling it to run on startup by default.
-To control the behavior of xDebug (in the `php-fpm` Container), you can run the following commands from the LaraDock root folder, (at the same prompt where you run docker-compose):
+To control the behavior of xDebug (in the `php-fpm` Container), you can run the following commands from the Laradock root folder, (at the same prompt where you run docker-compose):
- Stop xDebug from running by default: `./xdebugPhpFpm stop`.
- Start xDebug by default: `./xdebugPhpFpm start`.
@@ -381,10 +386,10 @@ It should be like this:
-
-## Prepare LaraDock for Production
+
+## Prepare Laradock for Production
-It's recommended for production to create a custom `docker-compose.yml` file. For that reason, LaraDock is shipped with `production-docker-compose.yml` which should contain only the containers you are planning to run on production (usage example: `docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...`).
+It's recommended for production to create a custom `docker-compose.yml` file. For that reason, Laradock is shipped with `production-docker-compose.yml` which should contain only the containers you are planning to run on production (usage example: `docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...`).
Note: The Database (MySQL/MariaDB/...) ports should not be forwarded on production, because Docker will automatically publish the port on the host, which is quite insecure, unless specifically told not to. So make sure to remove these lines:
@@ -439,7 +444,7 @@ For more about the Laravel installation click [here](https://laravel.com/docs/ma
3 - Edit `docker-compose.yml` to Map the new application path:
-By default, LaraDock assumes the Laravel application is living in the parent directory of the laradock folder.
+By default, Laradock assumes the Laravel application is living in the parent directory of the laradock folder.
Since the new Laravel application is in the `my-cool-app` folder, we need to replace `../:/var/www` with `../my-cool-app/:/var/www`, as follow:
@@ -456,7 +461,7 @@ Since the new Laravel application is in the `my-cool-app` folder, we need to rep
cd my-cool-app
```
-5 - Go back to the LaraDock installation steps to see how to edit the `.env` file.
+5 - Go back to the Laradock installation steps to see how to edit the `.env` file.
@@ -581,7 +586,7 @@ composer require predis/predis:^1.0
5 - You can manually test it from Laravel with this code:
```php
-\Cache::store('redis')->put('LaraDock', 'Awesome', 10);
+\Cache::store('redis')->put('Laradock', 'Awesome', 10);
```
@@ -893,7 +898,7 @@ docker-compose up -d minio
## Install CodeIgniter
-To install CodeIgniter 3 on LaraDock all you have to do is the following simple steps:
+To install CodeIgniter 3 on Laradock all you have to do is the following simple steps:
1 - Open the `docker-compose.yml` file.
@@ -1198,7 +1203,7 @@ It should be like this:
## Common Terminal Aliases
-When you start your docker container, LaraDock will copy the `aliases.sh` file located in the `laradock/workspace` directory and add sourcing to the container `~/.bashrc` file.
+When you start your docker container, Laradock will copy the `aliases.sh` file located in the `laradock/workspace` directory and add sourcing to the container `~/.bashrc` file.
You are free to modify the `aliases.sh` as you see fit, adding your own aliases (or function macros) to suit your requirements.
@@ -1292,10 +1297,10 @@ Remote debug Laravel web and phpunit tests.
-
-## Keep track of your LaraDock changes
+
+## Keep track of your Laradock changes
-1. Fork the LaraDock repository.
+1. Fork the Laradock repository.
2. Use that fork as a submodule.
3. Commit all your changes to your fork.
4. Pull new stuff from the main repository from time to time.
@@ -1308,14 +1313,14 @@ Remote debug Laravel web and phpunit tests.
-## Upgrading LaraDock
+## Upgrading Laradock
-Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading LaraDock from v3.* to v4.*:
+Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading Laradock from v3.* to v4.*:
1. Stop the docker VM `docker-machine stop {default}`
2. Install Docker for [Mac](https://docs.docker.com/docker-for-mac/) or [Windows](https://docs.docker.com/docker-for-windows/).
-3. Upgrade LaraDock to `v4.*.*` (`git pull origin master`)
-4. Use LaraDock as you used to do: `docker-compose up -d nginx mysql`.
+3. Upgrade Laradock to `v4.*.*` (`git pull origin master`)
+4. Use Laradock as you used to do: `docker-compose up -d nginx mysql`.
**Note:** If you face any problem with the last step above: rebuild all your containers
`docker-compose build --no-cache`
@@ -1454,4 +1459,4 @@ This error sometimes happens because your Laravel application isn't running on t
1. Check your running Laravel application IP by dumping `Request::ip()` variable using `dd(Request::ip())` anywhere on your application. The result is the IP of your Laravel container.
2. Change the `DB_HOST` variable on env with the IP that you received from previous step.
* Option B
- 1. Change the `DB_HOST` value to the same name as the MySQL docker container. The LaraDock docker-compose file currently has this as `mysql`
+ 1. Change the `DB_HOST` value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this as `mysql`
diff --git a/DOCUMENTATION/_settings/content/getting-started/index.md b/DOCUMENTATION/_settings/content/getting-started/index.md
new file mode 100644
index 00000000..29eb1fa1
--- /dev/null
+++ b/DOCUMENTATION/_settings/content/getting-started/index.md
@@ -0,0 +1,210 @@
+---
+title: Getting Started
+type: index
+weight: 2
+---
+
+## Requirements
+
+- [Git](https://git-scm.com/downloads)
+- [Docker](https://www.docker.com/products/docker/) `>= 1.12`
+
+
+
+
+
+
+
+## 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)
+- [B) Setup for Multiple Projects](#B)
+
+
+
+### 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:
+
+1 - Clone laradock on your project root directory:
+
+```bash
+git submodule add https://github.com/Laradock/laradock.git
+```
+
+**Notes:**
+
+- If you are not using Git yet for your project, you can use `git clone` instead of `git submodule `.
+
+- Note 2: To keep track of your Laradock changes, between your projects and also keep Laradock updated. [Check this](#keep-tracking-Laradock)
+
+
+Your folder structure should look like this:
+
+```
++ project-a
+ + laradock-a
++ project-b
+ + laradock-b
+```
+
+(It's important to rename the folders differently in each project.)
+
+> **Now jump to the [Usage](#Usage) section.**
+
+
+### A.2) Don't have a PHP project yet:
+
+1 - Clone this repository anywhere on your machine:
+
+```bash
+git clone https://github.com/laradock/laradock.git
+```
+
+Your folder structure should look like this:
+
+```
++ laradock
++ project-z
+```
+
+2 - Edit your web server sites configuration.
+
+**In case of NGINX:** open `nginx/sites/default.conf` and change the `root` from `/var/www/public` to `/var/www/{my-project-folder-name}/public`.
+
+*Or you can keep `default.conf` as it is, and create a separate config `my-site.conf` file for it.*
+
+**In case of Apache:** :P
+
+
+
+> **Now jump to the [Usage](#Usage) section.**
+
+
+
+### 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)):
+
+```bash
+git clone https://github.com/laradock/laradock.git
+```
+
+Your folder structure should look like this:
+
+```
++ laradock
++ project-1
++ project-2
+```
+
+2 - Go to `nginx/sites` and create config files to point to different project directory when visiting different domains.
+
+Laradock by default includes `project-1.conf` and `project-2.conf` as working samples.
+
+3 - change the default names `project-n`:
+
+You can rename the config files, project folders and domains as you like, just make sure the `root` in the config files, is pointing to the correct project folder name.
+
+4 - Add the domains to the **hosts** files.
+
+```
+127.0.0.1 project-1.dev
+127.0.0.1 project-2.dev
+```
+
+> **Now jump to the [Usage](#Usage) section.**
+
+
+
+
+
+
+
+
+## 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](#upgrading-laradock)
+- Use Laradock v3.* (Visit the `Laradock-ToolBox` [Branch](https://github.com/laradock/laradock/tree/Laradock-ToolBox)).
+
+
+
+>**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.
+
+
+
+1 - Enter the laradock folder and rename `env-example` to `.env`
+
+```shell
+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:
+
+```bash
+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 the list below:
+
+> `nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `beanstalkd-console`, `workspace`, `phpmyadmin`, `aerospike`, `pgadmin`, `elasticsearch`, `rethinkdb`, `postgres-postgis`, `certbot`, `mailhog`, `minio` and more...!
+
+*(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).*
+
+
+
+3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...)
+
+```bash
+docker-compose exec workspace bash
+```
+
+*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:
+
+```shell
+docker-compose exec --user=laradock workspace bash
+```
+
+*You can change the PUID (User id) and PGID (group id) variables from the `.env` file)*
+
+
+4 - Update your project configurations to use the database host
+
+Open your PHP project's `.env` file or whichever configuration file you are reading from, and set the database host `DB_HOST` to `mysql`:
+
+```env
+DB_HOST=mysql
+```
+
+*If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
+
+
+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
+
+
diff --git a/docs/_settings/content/help/index.md b/DOCUMENTATION/_settings/content/help/index.md
similarity index 65%
rename from docs/_settings/content/help/index.md
rename to DOCUMENTATION/_settings/content/help/index.md
index db758fd0..3f2342de 100644
--- a/docs/_settings/content/help/index.md
+++ b/DOCUMENTATION/_settings/content/help/index.md
@@ -4,6 +4,6 @@ type: index
weight: 5
---
-Join the chat room on [Gitter](https://gitter.im/LaraDock/laradock) and get help and support from the community.
+Join the chat room on [Gitter](https://gitter.im/Laradock/laradock) and get help and support from the community.
-You can as well can open an [issue](https://github.com/laradock/laradock/issues) on Github (will be labeled as Question) and discuss it with people on [Gitter](https://gitter.im/LaraDock/laradock).
+You can as well can open an [issue](https://github.com/laradock/laradock/issues) on Github (will be labeled as Question) and discuss it with people on [Gitter](https://gitter.im/Laradock/laradock).
diff --git a/docs/_settings/content/index.md b/DOCUMENTATION/_settings/content/index.md
similarity index 100%
rename from docs/_settings/content/index.md
rename to DOCUMENTATION/_settings/content/index.md
diff --git a/docs/_settings/content/introduction/index.md b/DOCUMENTATION/_settings/content/introduction/index.md
similarity index 79%
rename from docs/_settings/content/introduction/index.md
rename to DOCUMENTATION/_settings/content/introduction/index.md
index 463bf0b1..44ae7a70 100644
--- a/docs/_settings/content/introduction/index.md
+++ b/DOCUMENTATION/_settings/content/introduction/index.md
@@ -4,11 +4,11 @@ type: index
weight: 1
---
-LaraDock strives to make the PHP development experience easier and faster.
+Laradock strives to make the PHP development experience easier and faster.
It contains pre-packaged Docker Images that provides you a wonderful *development* environment without requiring you to install PHP, NGINX, MySQL, Redis, and any other software on your machines.
-LaraDock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal...).
+Laradock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal...).
@@ -17,19 +17,25 @@ LaraDock is configured to run Laravel Apps by default, and it can be modified to
Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL`, `Redis` and `beanstalkd`:
-1 - Clone LaraDock inside your PHP project:
+1 - Clone Laradock inside your PHP project:
```shell
git clone https://github.com/Laradock/laradock.git
```
-2 - Enter the laradock folder and run this command:
+2 - Enter the laradock folder and rename `env-example` to `.env`.
+
+```shell
+cp env-example .env
+```
+
+3 - Run your containers:
```shell
docker-compose up -d nginx mysql redis beanstalkd
```
-3 - Open your `.env` file and set the following:
+3 - Open your project's `.env` file and set the following:
```shell
DB_HOST=mysql
@@ -76,17 +82,17 @@ Most importantly Docker can run on Development and on Production (same environme
-## LaraDock VS Homestead (For Laravel Developers)
+## Laradock VS Homestead (For Laravel Developers)
-> LaraDock It's like Laravel Homestead but for Docker instead of Vagrant.
+> Laradock It's like Laravel Homestead but for Docker instead of Vagrant.
-LaraDock and [Homestead](https://laravel.com/docs/master/homestead) both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).
+Laradock and [Homestead](https://laravel.com/docs/master/homestead) both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).
- Homestead is a tool that controls Vagrant for you (using Homestead special commands). And Vagrant manages your Virtual Machine.
-- LaraDock is a tool that controls Docker for you (using Docker & Docker Compose official commands). And Docker manages your Virtual Containers.
+- Laradock is a tool that controls Docker for you (using Docker & Docker Compose official commands). And Docker manages your Virtual Containers.
-Running a virtual container is much faster than running a full virtual Machine. Thus **LaraDock is much faster than Homestead**.
+Running a virtual container is much faster than running a full virtual Machine. Thus **Laradock is much faster than Homestead**.
@@ -100,10 +106,10 @@ Running a virtual container is much faster than running a full virtual Machine.
What's better than a **Demo Video**:
-- LaraDock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
-- LaraDock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA)
-- LaraDock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
-- LaraDock [v0.1](https://www.youtube.com/watch?v=3YQsHe6oF80)
+- Laradock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
+- Laradock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA)
+- Laradock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
+- Laradock [v0.1](https://www.youtube.com/watch?v=3YQsHe6oF80)
@@ -139,11 +145,12 @@ What's better than a **Demo Video**:
- **Database Engines:**
- MySQL
- - PostgreSQL
- MariaDB
- MongoDB
- Neo4j
- RethinkDB
+ - PostgreSQL
+ - Postgres Postgis
- **Cache Engines:**
- Redis
- Memcached
@@ -165,6 +172,8 @@ What's better than a **Demo Video**:
- PgAdmin
- ElasticSearch
- Selenium
+ - Certbot
+ - Mailhog
- Minio
- Workspace
- PHP7-CLI
@@ -194,4 +203,4 @@ What's better than a **Demo Video**:
You are welcome to join our chat room on Gitter.
-[![Gitter](https://badges.gitter.im/LaraDock/laradock.svg)](https://gitter.im/LaraDock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
+[![Gitter](https://badges.gitter.im/Laradock/laradock.svg)](https://gitter.im/Laradock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
diff --git a/docs/_settings/content/license/index.md b/DOCUMENTATION/_settings/content/license/index.md
similarity index 100%
rename from docs/_settings/content/license/index.md
rename to DOCUMENTATION/_settings/content/license/index.md
diff --git a/docs/_settings/content/related-projects/index.md b/DOCUMENTATION/_settings/content/related-projects/index.md
similarity index 83%
rename from docs/_settings/content/related-projects/index.md
rename to DOCUMENTATION/_settings/content/related-projects/index.md
index f4b4a42c..b5c30959 100644
--- a/docs/_settings/content/related-projects/index.md
+++ b/DOCUMENTATION/_settings/content/related-projects/index.md
@@ -4,10 +4,10 @@ type: index
weight: 4
---
-LaraDock related projects:
+Laradock related projects:
-* [LaraDock CLI](https://github.com/lorinlee/laradock-cli) by [LorinLee](https://github.com/lorinlee)
-* [LaraDock Env](https://github.com/bagart/laradock_env) by [BAGArt](https://github.com/bagart)
+* [Laradock CLI](https://github.com/lorinlee/laradock-cli) by [LorinLee](https://github.com/lorinlee)
+* [Laradock Env](https://github.com/bagart/laradock_env) by [BAGArt](https://github.com/bagart)
* [Klaradock](https://github.com/poyhsiao/Klaradock) by [Kim Hsiao](https://github.com/poyhsiao)
* [Ansible Laradock Kubernetes](https://github.com/sifat-rahim/ansible-laradock-kubernetes) by [Sifat Rahim](https://github.com/sifat-rahim)
These Docker Compose projects have piqued our interest:
diff --git a/docs/_settings/static/.gitkeep b/DOCUMENTATION/_settings/static/.gitkeep
similarity index 100%
rename from docs/_settings/static/.gitkeep
rename to DOCUMENTATION/_settings/static/.gitkeep
diff --git a/DOCUMENTATION/_settings/static/CNAME b/DOCUMENTATION/_settings/static/CNAME
new file mode 100644
index 00000000..df75fb6b
--- /dev/null
+++ b/DOCUMENTATION/_settings/static/CNAME
@@ -0,0 +1 @@
+laradock.io
\ No newline at end of file
diff --git a/docs/_settings/themes/hugo-material-docs/CHANGELOG.md b/DOCUMENTATION/_settings/themes/hugo-material-docs/CHANGELOG.md
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/CHANGELOG.md
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/CHANGELOG.md
diff --git a/docs/_settings/themes/hugo-material-docs/LICENSE.md b/DOCUMENTATION/_settings/themes/hugo-material-docs/LICENSE.md
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/LICENSE.md
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/LICENSE.md
diff --git a/docs/_settings/themes/hugo-material-docs/README.md b/DOCUMENTATION/_settings/themes/hugo-material-docs/README.md
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/README.md
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/README.md
diff --git a/docs/_settings/themes/hugo-material-docs/archetypes/default.md b/DOCUMENTATION/_settings/themes/hugo-material-docs/archetypes/default.md
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/archetypes/default.md
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/archetypes/default.md
diff --git a/docs/_settings/themes/hugo-material-docs/images/screenshot.png b/DOCUMENTATION/_settings/themes/hugo-material-docs/images/screenshot.png
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/images/screenshot.png
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/images/screenshot.png
diff --git a/docs/_settings/themes/hugo-material-docs/images/tn.png b/DOCUMENTATION/_settings/themes/hugo-material-docs/images/tn.png
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/images/tn.png
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/images/tn.png
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/404.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/404.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/404.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/404.html
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/_default/__list.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/_default/__list.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/_default/__list.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/_default/__list.html
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/_default/single.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/_default/single.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/_default/single.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/_default/single.html
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/index.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/index.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/index.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/index.html
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/partials/drawer.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/drawer.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/partials/drawer.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/drawer.html
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/partials/footer.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/footer.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/partials/footer.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/footer.html
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/partials/footer_js.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/footer_js.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/partials/footer_js.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/footer_js.html
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/partials/head.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/head.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/partials/head.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/head.html
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/partials/header.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/header.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/partials/header.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/header.html
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/partials/nav.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/nav.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/partials/nav.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/nav.html
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/partials/nav_link.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/nav_link.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/partials/nav_link.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/nav_link.html
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/shortcodes/note.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/shortcodes/note.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/shortcodes/note.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/shortcodes/note.html
diff --git a/docs/_settings/themes/hugo-material-docs/layouts/shortcodes/warning.html b/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/shortcodes/warning.html
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/layouts/shortcodes/warning.html
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/shortcodes/warning.html
diff --git a/docs/_settings/themes/hugo-material-docs/static/fonts/icon.eot b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/fonts/icon.eot
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/fonts/icon.eot
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/fonts/icon.eot
diff --git a/docs/_settings/themes/hugo-material-docs/static/fonts/icon.svg b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/fonts/icon.svg
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/fonts/icon.svg
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/fonts/icon.svg
diff --git a/docs/_settings/themes/hugo-material-docs/static/fonts/icon.ttf b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/fonts/icon.ttf
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/fonts/icon.ttf
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/fonts/icon.ttf
diff --git a/docs/_settings/themes/hugo-material-docs/static/fonts/icon.woff b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/fonts/icon.woff
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/fonts/icon.woff
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/fonts/icon.woff
diff --git a/docs/_settings/themes/hugo-material-docs/static/images/colors.png b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/colors.png
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/images/colors.png
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/colors.png
diff --git a/docs/_settings/themes/hugo-material-docs/static/images/favicon.ico b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/favicon.ico
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/images/favicon.ico
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/favicon.ico
diff --git a/docs/_settings/themes/hugo-material-docs/static/images/logo.png b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/logo.png
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/images/logo.png
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/logo.png
diff --git a/docs/_settings/themes/hugo-material-docs/static/images/screen.png b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/screen.png
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/images/screen.png
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/screen.png
diff --git a/docs/_settings/themes/hugo-material-docs/static/javascripts/application.js b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/javascripts/application.js
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/javascripts/application.js
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/javascripts/application.js
diff --git a/docs/_settings/themes/hugo-material-docs/static/javascripts/modernizr.js b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/javascripts/modernizr.js
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/javascripts/modernizr.js
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/javascripts/modernizr.js
diff --git a/docs/_settings/themes/hugo-material-docs/static/stylesheets/application.css b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/stylesheets/application.css
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/stylesheets/application.css
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/stylesheets/application.css
diff --git a/docs/_settings/themes/hugo-material-docs/static/stylesheets/highlight/highlight.css b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/stylesheets/highlight/highlight.css
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/stylesheets/highlight/highlight.css
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/stylesheets/highlight/highlight.css
diff --git a/docs/_settings/themes/hugo-material-docs/static/stylesheets/palettes.css b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/stylesheets/palettes.css
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/stylesheets/palettes.css
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/stylesheets/palettes.css
diff --git a/docs/_settings/themes/hugo-material-docs/static/stylesheets/temporary.css b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/stylesheets/temporary.css
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/static/stylesheets/temporary.css
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/static/stylesheets/temporary.css
diff --git a/docs/_settings/themes/hugo-material-docs/theme.toml b/DOCUMENTATION/_settings/themes/hugo-material-docs/theme.toml
similarity index 100%
rename from docs/_settings/themes/hugo-material-docs/theme.toml
rename to DOCUMENTATION/_settings/themes/hugo-material-docs/theme.toml
diff --git a/apache2/Dockerfile b/apache2/Dockerfile
index 569ba9f3..e2b4ce41 100644
--- a/apache2/Dockerfile
+++ b/apache2/Dockerfile
@@ -6,11 +6,13 @@ ARG PHP_SOCKET=php-fpm:9000
ENV WEB_PHP_SOCKET=$PHP_SOCKET
-ENV WEB_DOCUMENT_ROOT=/var/www/public
+ENV WEB_DOCUMENT_ROOT=/var/www/
EXPOSE 80 443
-WORKDIR /var/www/public
+WORKDIR /var/www/
+
+ADD vhost.conf /etc/apache2/sites-enabled/vhost.conf
ENTRYPOINT ["/opt/docker/bin/entrypoint.sh"]
diff --git a/apache2/sites/.gitignore b/apache2/sites/.gitignore
new file mode 100644
index 00000000..f1f9322e
--- /dev/null
+++ b/apache2/sites/.gitignore
@@ -0,0 +1,3 @@
+*.conf
+!default.conf
+!default.apache.conf
diff --git a/apache2/sites/default.apache.conf b/apache2/sites/default.apache.conf
new file mode 100644
index 00000000..2d15dafc
--- /dev/null
+++ b/apache2/sites/default.apache.conf
@@ -0,0 +1,16 @@
+
-
->**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 errors as much as possible.
-
-
-
-1 - Run Containers: *(Make sure you are in the `laradock` folder before running the `docker-compose` commands).*
-
-
-**Example:** Running NGINX and MySQL:
-
-```bash
-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 the list below:
-
-`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `workspace`, `phpmyadmin`, `aerospike`, `pgadmin`, `elasticsearch`, `rethinkdb`.
-
-
-
-2 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, ...).
-
-```bash
-docker-compose exec workspace bash
-```
-
-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` (example `docker-compose exec --user=laradock workspace bash`) to have files created as your host's user. (you can change the PUID (User id) and PGID (group id) variables from the `docker-compose.yml`).
-
-
-3 - Edit your project configurations.
-
-Open your `.env` file and set the `DB_HOST` to `mysql`:
-
-```env
-DB_HOST=mysql
-```
-
-*If you want to use Laravel and you don't have it installed yet, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
-
-
-4 - Open your browser and visit your localhost address (`http://localhost/`).
-
-
-**Debugging**: if you are facing any problem here check the [Debugging](#debugging) section.
-
-If you need a special support. Contact me, more details in the [Help & Questions](#Help) section.
diff --git a/docs/contributing/index.html b/docs/contributing/index.html
index 19bc73aa..311b1e14 100644
--- a/docs/contributing/index.html
+++ b/docs/contributing/index.html
@@ -315,39 +315,52 @@
Your contribution is more than welcome.
-If you have questions about how to use LaraDock, please direct your questions to the discussion on Gitter. If you believe your question could help others, then consider opening an Issue (it will be labeled as Question).
+If you have questions about how to use Laradock, please direct your questions to the discussion on Gitter. If you believe your question could help others, then consider opening an Issue (it will be labeled as Question
) And you can still seek help on Gitter for it.
If you find a bug in the source code or a mistake in the documentation, you can help us by -submitting an Issue. Even better you can submit a Pull Request with a fix.
+If have an issue or you found a typo in the documentation, you can help us by +opnening an Issue.
-Steps to do before opening an Issue:
-You can request a new feature by submitting an Issue (it will be labeled as Feature Suggestion). If you would like to implement a new feature then consider submitting a Pull Request.
+Before you submit your issue search the archive, maybe your question was already answered couple hours ago (search in the closed Issues as well).
Decide if the Issue belongs to this project or to Docker itself! or even the tool you are using such as Nginx or MongoDB…
If your issue appears to be a bug, and hasn’t been reported, then open a new issue.
+ +This Help us to maximize the effort we can spend fixing issues and adding new +features, by not reporting duplicate issues.
+ +You can request a new feature by submitting an Issue (it will be labeled as Feature Suggestion
). If you would like to implement a new feature then consider submitting a Pull Request yourself.
Laradock uses Hugo as website generator tool, with the Material Docs theme. You might need to check their docs quickly.
/docs
._settings
folder & the CNAME
file.docs/_settings
from your terminal and run hugo serve
to host the website locally.docs/_settings/content
and search for the folder of the section you want to edit.index.md
file, that’s the file you need to edit.docs/_settings/config.toml
and add the section there.hugo
to generate the updated site inside the docs
folder.DOCUMENTATION/_settings/content
and search for the markdown file you want to edit (every folder represents a section in the menu)./docs
folder from the root.hugo
command to generate the HTML docs (in the /docs
).Go to DOCUMENTATION/_settings
in your terminal and run hugo serve
to host the website locally.
To add a new section to the sidebar or edit existing one, you need to edit this file DOCUMENTATION/_settings/config.toml
.
Create folder with the software name.
Make sure you follow our commenting style.
Add the software in the Readme
.
Add the software in the Documentation
.
Open the software (container) folder.
Edit the files you want to update.
Note: If you want to edit the base image of the Workspace
or the php-fpm
Containers,
-you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the LaraDock repository.
Make sure to update the Readme
in case you made any changes.
Make sure to update the Documentation
in case you made any changes.
Before you submit your issue search the archive, maybe your question was already answered.
- -If your issue appears to be a bug, and hasn’t been reported, open a new issue. -Help us to maximize the effort we can spend fixing issues and adding new -features, by not reporting duplicate issues.
- -Always Test everything and make sure its working:
@@ -402,16 +407,16 @@ features, by not reporting duplicate issues.Consider the following guidelines:
Search GitHub for an open or closed Pull Request that relates to your submission. You don’t want to duplicate effort.
Search GitHub for an open or closed Pull Request that relates to your submission. You don’t want to duplicate efforts.
Make your changes in a new git branch:
@@ -446,10 +451,9 @@ git push origin my-fix-branch -fWARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.
-After your pull request is merged, you can safely delete your branch and pull the changes -from the main (upstream) repository:
+After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
@@ -475,7 +479,7 @@ from the main (upstream) repository:Choose the setup the best suits your needs.
-(In case you want a Docker environment for each project)
+(In case you already have a project, and you want to setup an environment to run it)
+1 - Clone this repository on your project root directory:
+++ + + +(Follow these steps if you want a separate Docker environment for each project)
+
1 - Clone laradock on your project root directory:
git submodule add https://github.com/Laradock/laradock.git
-Note 1: If you are not yet using Git for your PHP project, you can use git clone https://github.com/Laradock/laradock.git
instead.
Notes:
-Note 2: To keep track of your LaraDock changes, between your projects and also keep LaraDock updated. Check this
+If you are not using Git yet for your project, you can use git clone
instead of git submodule
.
Note 3: In this case the folder structure will be like this:
+Note 2: To keep track of your Laradock changes, between your projects and also keep Laradock updated. Check this
- project1
- - laradock
-- project2
- - laradock
+Your folder structure should look like this:
+
++ project-a
+ + laradock-a
++ project-b
+ + laradock-b
-A.2) Setup environment first then create project:
+(It’s important to rename the folders differently in each project.)
-(In case you don’t have a project, and you want to create your project inside the Docker environment)
+
+Now jump to the Usage section.
+
+
+
+
+A.2) Don’t have a PHP project yet:
1 - Clone this repository anywhere on your machine:
git clone https://github.com/laradock/laradock.git
-Note: In this case the folder structure will be like this:
+Your folder structure should look like this:
-- projects
- - laradock
- - myProject
++ laradock
++ project-z
-2 - Edit the docker-compose.yml
file to map to your project directory once you have it (example: - ../myProject:/var/www
).
+2 - Edit your web server sites configuration.
-3 - Stop and re-run your docker-compose command for the changes to take place.
+In case of NGINX: open nginx/sites/default.conf
and change the root
from /var/www/public
to /var/www/{my-project-folder-name}/public
.
-docker-compose stop && docker-compose up -d XXXX YYYY ZZZZ ....
-
+Or you can keep default.conf
as it is, and create a separate config my-site.conf
file for it.
-B) Setup for Multiple Projects:
+In case of Apache: :P
+
-1 - Clone this repository anywhere on your machine:
+
+Now jump to the Usage section.
+
+
+
+
+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):
git clone https://github.com/laradock/laradock.git
-2 - Edit the docker-compose.yml
file to map to your projects directories:
+Your folder structure should look like this:
- applications:
- image: tianon/true
- volumes:
- - ../project1/:/var/www/project1
- - ../project2/:/var/www/project2
++ laradock
++ project-1
++ project-2
-3 - You can access all sites by visiting http://localhost/project1/public
and http://localhost/project2/public
but of course that’s not very useful so let’s setup NGINX quickly.
+2 - Go to nginx/sites
and create config files to point to different project directory when visiting different domains.
-4 - Go to nginx/sites
and copy sample.conf.example
to project1.conf
then to project2.conf
+Laradock by default includes project-1.conf
and project-2.conf
as working samples.
-5 - Open the project1.conf
file and edit the server_name
and the root
as follow:
+3 - change the default names project-n
:
- server_name project1.dev;
- root /var/www/project1/public;
+You can rename the config files, project folders and domains as you like, just make sure the root
in the config files, is pointing to the correct project folder name.
+
+4 - Add the domains to the hosts files.
+
+127.0.0.1 project-1.dev
+127.0.0.1 project-2.dev
-Do the same for each project project2.conf
, project3.conf
,…
+
+Now jump to the Usage section.
+
-6 - Add the domains to the hosts files.
-
-127.0.0.1 project1.dev
-
-
-7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.
+
Usage
@@ -414,61 +448,72 @@
If you are using Docker Toolbox (VM), do one of the following:
-- Upgrade to Docker Native for Mac/Windows (Recommended). Check out Upgrading LaraDock
-- Use LaraDock v3.* (Visit the
LaraDock-ToolBox
Branch).
+- Upgrade to Docker Native for Mac/Windows (Recommended). Check out Upgrading Laradock
+- Use Laradock v3.* (Visit the
Laradock-ToolBox
Branch).
-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 in order to prevent errors as much 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 in order to prevent as much errors as possible.
-1 - Run Containers: (Make sure you are in the laradock
folder before running the docker-compose
commands).
+1 - Enter the laradock folder and rename env-example
to .env
-Example: Running NGINX and MySQL:
+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:
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 the list below:
+You can select your own combination of containers form the list below:
-nginx
, hhvm
, php-fpm
, mysql
, redis
, postgres
, mariadb
, neo4j
, mongo
, apache2
, caddy
, memcached
, beanstalkd
, beanstalkd-console
, rabbitmq
, workspace
, phpmyadmin
, aerospike
, pgadmin
, elasticsearch
, rethinkdb
.
+
+nginx
, hhvm
, php-fpm
, mysql
, redis
, postgres
, mariadb
, neo4j
, mongo
, apache2
, caddy
, memcached
, beanstalkd
, beanstalkd-console
, rabbitmq
, beanstalkd-console
, workspace
, phpmyadmin
, aerospike
, pgadmin
, elasticsearch
, rethinkdb
, postgres-postgis
, certbot
, mailhog
, minio
and more…!
+
+
+(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).
-2 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, …).
+3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, …)
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:
docker exec -it {workspace-container-id} bash
-Note: You can add --user=laradock
(example docker-compose exec --user=laradock workspace bash
) to have files created as your host’s user. (you can change the PUID (User id) and PGID (group id) variables from the docker-compose.yml
).
+Note: You can add --user=laradock
to have files created as your host’s user. Example:
+
+docker-compose exec --user=laradock workspace bash
+
+
+You can change the PUID (User id) and PGID (group id) variables from the .env
file)
-3 - Edit your project configurations.
+4 - Update your project configurations to use the database host
-Open your .env
file and set the DB_HOST
to mysql
:
+Open your PHP project’s .env
file or whichever configuration file you are reading from, and set the database host DB_HOST
to mysql
:
DB_HOST=mysql
-If you want to use Laravel and you don’t have it installed yet, see How to Install Laravel in a Docker Container.
+If you want to install Laravel as PHP project, see How to Install Laravel in a Docker Container.
-4 - Open your browser and visit your localhost address (http://localhost/
).
-
-
-Debugging: if you are facing any problem here check the Debugging section.
-
-If you need a special support. Contact me, more details in the Help & Questions section.
+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