From e0e4616ae0b38322776c1b5432e13d5aa9da7197 Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Thu, 16 Mar 2017 17:03:05 -0400 Subject: [PATCH] update installation steps in the docs (.env) --- docker-compose.yml | 2 +- docs/_settings/content/contributing/index.md | 4 +- docs/_settings/content/documentation/index.md | 34 ++-- .../content/getting-started/index.md | 70 ++++--- docs/_settings/content/help/index.md | 4 +- docs/_settings/content/introduction/index.md | 41 +++-- .../content/related-projects/index.md | 6 +- docs/contributing/index.html | 4 +- docs/contributing/index.xml | 4 +- docs/documentation/index.html | 34 ++-- docs/documentation/index.xml | 34 ++-- docs/getting-started/index.html | 83 ++++++--- docs/getting-started/index.xml | 83 ++++++--- docs/help/index.html | 4 +- docs/help/index.xml | 4 +- docs/index.html | 171 +++++++++++------- docs/index.xml | 171 +++++++++++------- docs/introduction/index.html | 40 ++-- docs/introduction/index.xml | 40 ++-- docs/related-projects/index.html | 6 +- docs/related-projects/index.xml | 6 +- env-example | 2 +- 22 files changed, 519 insertions(+), 328 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0bad6746..4bda231b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: applications: image: tianon/true volumes: - - ${APPLICATIONS_HOST_DIR}:/var/www + - ${APPLICATION_1}:/var/www ### Workspace Utilities Container ########################### diff --git a/docs/_settings/content/contributing/index.md b/docs/_settings/content/contributing/index.md index 4631aa7a..14d01109 100644 --- a/docs/_settings/content/contributing/index.md +++ b/docs/_settings/content/contributing/index.md @@ -9,7 +9,7 @@ Your contribution is more than welcome. ## Got a Question or 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). ## Found an Issue? If you find a bug in the source code or a mistake in the documentation, you can help us by @@ -62,7 +62,7 @@ Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Ma * 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. diff --git a/docs/_settings/content/documentation/index.md b/docs/_settings/content/documentation/index.md index f8785f81..ee2e5d75 100644 --- a/docs/_settings/content/documentation/index.md +++ b/docs/_settings/content/documentation/index.md @@ -329,7 +329,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 +381,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 +439,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 +456,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 +581,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 +893,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 +1198,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 +1292,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 +1308,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 +1454,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/docs/_settings/content/getting-started/index.md b/docs/_settings/content/getting-started/index.md index 858f95b9..f767d386 100644 --- a/docs/_settings/content/getting-started/index.md +++ b/docs/_settings/content/getting-started/index.md @@ -19,23 +19,35 @@ weight: 2 Choose the setup the best suits your needs. -#### A) Setup for Single Project: -*(In case you want a Docker environment for each project)* +- [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.1) Setup environment in existing 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: + +#### 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: +> (Follow these steps if you already have a PHP project, and all you need is an environment to run it) + +1 - Clone laradock on your project root directory: ```bash 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](#keep-tracking-LaraDock)* +- 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](#keep-tracking-Laradock) + + +Your folder structure should look like this: ``` - project1 @@ -44,15 +56,18 @@ git submodule add https://github.com/Laradock/laradock.git - laradock ``` -##### A.2) Setup environment first then create project: -*(In case you don't have a project, and you want to create your project inside the Docker environment)* + + +##### A.2) Don't have a PHP project yet: +> (Follow these steps if you don't have a PHP project yet, and you need an environment to create the project) 1 - Clone this repository anywhere on your machine: ```bash 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 @@ -68,8 +83,9 @@ Note: In this case the folder structure will be like this: docker-compose stop && docker-compose up -d XXXX YYYY ZZZZ .... ``` - + #### B) Setup for Multiple Projects: +> (Follow these steps if you want a single Docker environment for all project) 1 - Clone this repository anywhere on your machine: @@ -77,11 +93,10 @@ docker-compose stop && docker-compose up -d XXXX YYYY ZZZZ .... git clone https://github.com/laradock/laradock.git ``` -2 - Edit the `docker-compose.yml` file to map to your projects directories: +2 - Edit the `docker-compose.yml` (or the `.env`) file to map to your projects directories: ``` applications: - image: tianon/true volumes: - ../project1/:/var/www/project1 - ../project2/:/var/www/project2 @@ -120,12 +135,12 @@ Do the same for each project `project2.conf`, `project3.conf`,... 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)). +- 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 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](#Build-Re-build-Containers) in order to prevent as much errors as possible.
@@ -143,7 +158,9 @@ docker-compose up -d nginx mysql 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).*
@@ -159,7 +176,13 @@ Alternatively, for Windows PowerShell users: execute the following command to en 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: + +```shell +docker-compose exec --user=laradock workspace bash +``` + +*You can change the PUID (User id) and PGID (group id) variables from the `docker-compose.yml` or the `.env`)*
3 - Edit your project configurations. @@ -170,12 +193,7 @@ Open your `.env` file and set the `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](#Install-Laravel).* +*If you want to install Laravel as PHP project, 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. +4 - Open your browser and visit your localhost address `http://localhost/`. diff --git a/docs/_settings/content/help/index.md b/docs/_settings/content/help/index.md index db758fd0..3f2342de 100644 --- a/docs/_settings/content/help/index.md +++ b/docs/_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/introduction/index.md b/docs/_settings/content/introduction/index.md index 463bf0b1..44ae7a70 100644 --- a/docs/_settings/content/introduction/index.md +++ b/docs/_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/related-projects/index.md b/docs/_settings/content/related-projects/index.md index f4b4a42c..b5c30959 100644 --- a/docs/_settings/content/related-projects/index.md +++ b/docs/_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/contributing/index.html b/docs/contributing/index.html index 19bc73aa..b40742f2 100644 --- a/docs/contributing/index.html +++ b/docs/contributing/index.html @@ -317,7 +317,7 @@

Got a Question or Problem?

-

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).

Found an Issue?

@@ -371,7 +371,7 @@ submitting an Issue. E
  • 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.

  • diff --git a/docs/contributing/index.xml b/docs/contributing/index.xml index 94bad44d..934ec393 100644 --- a/docs/contributing/index.xml +++ b/docs/contributing/index.xml @@ -20,7 +20,7 @@ <h2 id="got-a-question-or-problem">Got a Question or Problem?</h2> -<p>If you have questions about how to use LaraDock, please direct your questions to the discussion on <a href="https://gitter.im/LaraDock/laradock">Gitter</a>. If you believe your question could help others, then consider opening an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as Question).</p> +<p>If you have questions about how to use Laradock, please direct your questions to the discussion on <a href="https://gitter.im/Laradock/laradock">Gitter</a>. If you believe your question could help others, then consider opening an <a href="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as Question).</p> <h2 id="found-an-issue">Found an Issue?</h2> @@ -74,7 +74,7 @@ submitting an <a href="https://github.com/laradock/laradock/issues"&g <li><p>Edit the files you want to update.</p></li> <li><p><strong>Note:</strong> If you want to edit the base image of the <code>Workspace</code> or the <code>php-fpm</code> Containers, -you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the LaraDock repository.</p></li> +you need to edit their Docker-files from their GitHub repositories. For more info read their Dockerfiles comment on the Laradock repository.</p></li> <li><p>Make sure to update the <code>Readme</code> in case you made any changes.</p></li> </ul> diff --git a/docs/documentation/index.html b/docs/documentation/index.html index 6f6830a1..e43cb4ed 100644 --- a/docs/documentation/index.html +++ b/docs/documentation/index.html @@ -577,7 +577,7 @@ xdebug.remote_connect_back=1

    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):

    diff --git a/docs/documentation/index.xml b/docs/documentation/index.xml index 6eb19dd5..29310c57 100644 --- a/docs/documentation/index.xml +++ b/docs/documentation/index.xml @@ -280,7 +280,7 @@ xdebug.remote_connect_back=1 <p>By installing xDebug, you are enabling it to run on startup by default.</p> -<p>To control the behavior of xDebug (in the <code>php-fpm</code> Container), you can run the following commands from the LaraDock root folder, (at the same prompt where you run docker-compose):</p> +<p>To control the behavior of xDebug (in the <code>php-fpm</code> Container), you can run the following commands from the Laradock root folder, (at the same prompt where you run docker-compose):</p> <ul> <li>Stop xDebug from running by default: <code>./xdebugPhpFpm stop</code>.</li> @@ -320,11 +320,11 @@ xdebug.remote_connect_back=1 <a name="Production"></a></p> <p><br> -<a name="LaraDock-for-Production"></a></p> +<a name="Laradock-for-Production"></a></p> -<h2 id="prepare-laradock-for-production">Prepare LaraDock for Production</h2> +<h2 id="prepare-laradock-for-production">Prepare Laradock for Production</h2> -<p>It&rsquo;s recommended for production to create a custom <code>docker-compose.yml</code> file. For that reason, LaraDock is shipped with <code>production-docker-compose.yml</code> which should contain only the containers you are planning to run on production (usage example: <code>docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...</code>).</p> +<p>It&rsquo;s recommended for production to create a custom <code>docker-compose.yml</code> file. For that reason, Laradock is shipped with <code>production-docker-compose.yml</code> which should contain only the containers you are planning to run on production (usage example: <code>docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...</code>).</p> <p>Note: The Database (MySQL/MariaDB/&hellip;) 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:</p> @@ -365,7 +365,7 @@ xdebug.remote_connect_back=1 <p>3 - Edit <code>docker-compose.yml</code> to Map the new application path:</p> -<p>By default, LaraDock assumes the Laravel application is living in the parent directory of the laradock folder.</p> +<p>By default, Laradock assumes the Laravel application is living in the parent directory of the laradock folder.</p> <p>Since the new Laravel application is in the <code>my-cool-app</code> folder, we need to replace <code>../:/var/www</code> with <code>../my-cool-app/:/var/www</code>, as follow:</p> @@ -381,7 +381,7 @@ xdebug.remote_connect_back=1 <pre><code class="language-bash">cd my-cool-app </code></pre> -<p>5 - Go back to the LaraDock installation steps to see how to edit the <code>.env</code> file.</p> +<p>5 - Go back to the Laradock installation steps to see how to edit the <code>.env</code> file.</p> <p><br> <a name="Run-Artisan-Commands"></a></p> @@ -483,7 +483,7 @@ SESSION_DRIVER=redis <p>5 - You can manually test it from Laravel with this code:</p> -<pre><code class="language-php">\Cache::store('redis')-&gt;put('LaraDock', 'Awesome', 10); +<pre><code class="language-php">\Cache::store('redis')-&gt;put('Laradock', 'Awesome', 10); </code></pre> <p><br> @@ -750,7 +750,7 @@ A package (<a href="https://github.com/duxet/laravel-rethinkdb">La <h2 id="install-codeigniter">Install CodeIgniter</h2> -<p>To install CodeIgniter 3 on LaraDock all you have to do is the following simple steps:</p> +<p>To install CodeIgniter 3 on Laradock all you have to do is the following simple steps:</p> <p>1 - Open the <code>docker-compose.yml</code> file.</p> @@ -990,7 +990,7 @@ port=1234 <h2 id="common-terminal-aliases">Common Terminal Aliases</h2> -<p>When you start your docker container, LaraDock will copy the <code>aliases.sh</code> file located in the <code>laradock/workspace</code> directory and add sourcing to the container <code>~/.bashrc</code> file.</p> +<p>When you start your docker container, Laradock will copy the <code>aliases.sh</code> file located in the <code>laradock/workspace</code> directory and add sourcing to the container <code>~/.bashrc</code> file.</p> <p>You are free to modify the <code>aliases.sh</code> as you see fit, adding your own aliases (or function macros) to suit your requirements.</p> @@ -1065,12 +1065,12 @@ e) set it to <code>true</code></p> <p><a href="https://github.com/laradock/laradock/blob/master/_guides/phpstorm.md"><strong>Debugging Guide Here</strong></a></p> <p><br> -<a name="keep-tracking-LaraDock"></a></p> +<a name="keep-tracking-Laradock"></a></p> -<h2 id="keep-track-of-your-laradock-changes">Keep track of your LaraDock changes</h2> +<h2 id="keep-track-of-your-laradock-changes">Keep track of your Laradock changes</h2> <ol> -<li>Fork the LaraDock repository.</li> +<li>Fork the Laradock repository.</li> <li>Use that fork as a submodule.</li> <li>Commit all your changes to your fork.</li> <li>Pull new stuff from the main repository from time to time.</li> @@ -1079,15 +1079,15 @@ e) set it to <code>true</code></p> <p><br> <a name="upgrading-laradock"></a></p> -<h2 id="upgrading-laradock">Upgrading LaraDock</h2> +<h2 id="upgrading-laradock">Upgrading Laradock</h2> -<p>Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading LaraDock from v3.* to v4.*:</p> +<p>Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading Laradock from v3.* to v4.*:</p> <ol> <li>Stop the docker VM <code>docker-machine stop {default}</code></li> <li>Install Docker for <a href="https://docs.docker.com/docker-for-mac/">Mac</a> or <a href="https://docs.docker.com/docker-for-windows/">Windows</a>.</li> -<li>Upgrade LaraDock to <code>v4.*.*</code> (<code>git pull origin master</code>)</li> -<li>Use LaraDock as you used to do: <code>docker-compose up -d nginx mysql</code>.</li> +<li>Upgrade Laradock to <code>v4.*.*</code> (<code>git pull origin master</code>)</li> +<li>Use Laradock as you used to do: <code>docker-compose up -d nginx mysql</code>.</li> </ol> <p><strong>Note:</strong> If you face any problem with the last step above: rebuild all your containers @@ -1203,7 +1203,7 @@ e) set it to <code>true</code></p> <li>Option B <ol> -<li>Change the <code>DB_HOST</code> value to the same name as the MySQL docker container. The LaraDock docker-compose file currently has this as <code>mysql</code></li> +<li>Change the <code>DB_HOST</code> value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this as <code>mysql</code></li> </ol></li> </ul> diff --git a/docs/getting-started/index.html b/docs/getting-started/index.html index 9285ff25..a93294df 100644 --- a/docs/getting-started/index.html +++ b/docs/getting-started/index.html @@ -324,24 +324,46 @@

    Choose the setup the best suits your needs.

    -

    A) Setup for Single Project:

    + -
    A.1) Setup environment in existing Project:
    +

    -

    (In case you already have a project, and you want to setup an environment to run it)

    +

    A) Setup for Single Project

    -

    1 - Clone this repository on your project root directory:

    +
    +

    (Follow these steps if you want a separate Docker environment for each project)

    +
    + +

    + +
    A.1) Already have a PHP project:
    + +
    +

    (Follow these steps if you already have a PHP project, and all you need is an environment to run it)

    +
    + +

    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

    + + +

    Your folder structure should look like this:

    - project1
     	- laradock
    @@ -349,16 +371,20 @@
     	- laradock
     
    -
    A.2) Setup environment first then create project:
    +

    -

    (In case you don’t have a project, and you want to create your project inside the Docker environment)

    +
    A.2) Don’t have a PHP project yet:
    + +
    +

    (Follow these steps if you don’t have a PHP project yet, and you need an environment to create the project)

    +

    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
    @@ -372,17 +398,22 @@
     
    docker-compose stop && docker-compose up -d XXXX YYYY ZZZZ ....
     
    +

    +

    B) Setup for Multiple Projects:

    +
    +

    (Follow these steps if you want a single Docker environment for all project)

    +
    +

    1 - Clone this repository anywhere on your machine:

    git clone https://github.com/laradock/laradock.git
     
    -

    2 - Edit the docker-compose.yml file to map to your projects directories:

    +

    2 - Edit the docker-compose.yml (or the .env) file to map to your projects directories:

        applications:
    -        image: tianon/true
             volumes:
                 - ../project1/:/var/www/project1
                 - ../project2/:/var/www/project2
    @@ -414,14 +445,14 @@
     

    If you are using Docker Toolbox (VM), do one of the following:


    -

    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.


    @@ -437,7 +468,9 @@

    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, …).

    @@ -450,7 +483,12 @@
    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 docker-compose.yml or the .env)


    3 - Edit your project configurations.

    @@ -460,15 +498,10 @@
    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.

    +4 - Open your browser and visit your localhost address http://localhost/.