little cleanup
This commit is contained in:
parent
4ce1d7f64a
commit
bce05e4b59
|
@ -10,7 +10,7 @@ env:
|
||||||
- PHP_VERSION=71
|
- PHP_VERSION=71
|
||||||
- HUGO_VERSION=0.19
|
- HUGO_VERSION=0.19
|
||||||
|
|
||||||
script: ./_scripts/travis-build.sh
|
script: ./travis-build.sh
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: pages
|
provider: pages
|
||||||
|
|
|
@ -336,11 +336,11 @@ 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`.
|
- Stop xDebug from running by default: `.php-fpm/xdebug stop`.
|
||||||
- Start xDebug by default: `./xdebugPhpFpm start`.
|
- Start xDebug by default: `.php-fpm/xdebug start`.
|
||||||
- See the status: `./xdebugPhpFpm status`.
|
- See the status: `.php-fpm/xdebug status`.
|
||||||
|
|
||||||
Note: If `./xdebugPhpFpm` doesn't execute and gives `Permission Denied` error the problem can be that file `xdebugPhpFpm` doesn't have execution access. This can be fixed by running `chmod` command with desired access permissions.
|
Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error the problem can be that file `xdebug` doesn't have execution access. This can be fixed by running `chmod` command with desired access permissions.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,7 @@ You can rename the config files, project folders and domains as you like, just m
|
||||||
If you are using **Docker Toolbox** (VM), do one of the following:
|
If you are using **Docker Toolbox** (VM), do one of the following:
|
||||||
|
|
||||||
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock)
|
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock)
|
||||||
- Use Laradock v3.\*. Visit the [LaraDock-ToolBox](https://github.com/laradock/laradock/tree/LaraDock-ToolBox) branch. *(outdated)*
|
- Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. *(outdated)*
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ $root@server:~# docker
|
||||||
$root@server:~# apt-get install git
|
$root@server:~# apt-get install git
|
||||||
$root@server:~# git clone https://github.com/laravel/laravel
|
$root@server:~# git clone https://github.com/laravel/laravel
|
||||||
$root@server:~# cd laravel
|
$root@server:~# cd laravel
|
||||||
$root@server:~/laravel/ git submodule add https://github.com/LaraDock/laradock.git
|
$root@server:~/laravel/ git submodule add https://github.com/Laradock/laradock.git
|
||||||
$root@server:~/laravel/ cd laradock
|
$root@server:~/laravel/ cd laradock
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ $root@server:~/laravel/laradock# curl -L https://github.com/docker/compose/relea
|
||||||
$root@server:~/chmod +x /usr/local/bin/docker-compose
|
$root@server:~/chmod +x /usr/local/bin/docker-compose
|
||||||
```
|
```
|
||||||
|
|
||||||
## Create Your LaraDock Containers
|
## Create Your Laradock Containers
|
||||||
|
|
||||||
```
|
```
|
||||||
$root@server:~/laravel/laradock# docker-compose up -d nginx mysql
|
$root@server:~/laravel/laradock# docker-compose up -d nginx mysql
|
||||||
|
@ -248,7 +248,7 @@ View your Site in the Browser Securely Using HTTPS (https://yourdomain.com)
|
||||||
- [Installation](#Installation)
|
- [Installation](#Installation)
|
||||||
- [Customize laradock/docker-compose.yml](#CustomizeDockerCompose)
|
- [Customize laradock/docker-compose.yml](#CustomizeDockerCompose)
|
||||||
- [Clean House](#InstallCleanHouse)
|
- [Clean House](#InstallCleanHouse)
|
||||||
- [LaraDock Dial Tone](#InstallLaraDockDialTone)
|
- [Laradock Dial Tone](#InstallLaradockDialTone)
|
||||||
- [hosts](#AddToHosts)
|
- [hosts](#AddToHosts)
|
||||||
- [Firewall](#FireWall)
|
- [Firewall](#FireWall)
|
||||||
- [Enable xDebug on php-fpm](#enablePhpXdebug)
|
- [Enable xDebug on php-fpm](#enablePhpXdebug)
|
||||||
|
@ -265,14 +265,14 @@ View your Site in the Browser Securely Using HTTPS (https://yourdomain.com)
|
||||||
<a name="Intro"></a>
|
<a name="Intro"></a>
|
||||||
## Intro
|
## Intro
|
||||||
|
|
||||||
Wiring up [Laravel](https://laravel.com/), [LaraDock](https://github.com/LaraDock/laradock) [Laravel+Docker] and [PHPStorm](https://www.jetbrains.com/phpstorm/) to play nice together complete with remote xdebug'ing as icing on top! Although this guide is based on `PHPStorm Windows`,
|
Wiring up [Laravel](https://laravel.com/), [Laradock](https://github.com/Laradock/laradock) [Laravel+Docker] and [PHPStorm](https://www.jetbrains.com/phpstorm/) to play nice together complete with remote xdebug'ing as icing on top! Although this guide is based on `PHPStorm Windows`,
|
||||||
you should be able to adjust accordingly. This guide was written based on Docker for Windows Native.
|
you should be able to adjust accordingly. This guide was written based on Docker for Windows Native.
|
||||||
|
|
||||||
<a name="Installation"></a>
|
<a name="Installation"></a>
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
- This guide assumes the following:
|
- This guide assumes the following:
|
||||||
- you have already installed and are familiar with Laravel, LaraDock and PHPStorm.
|
- you have already installed and are familiar with Laravel, Laradock and PHPStorm.
|
||||||
- you have installed Laravel as a parent of `laradock`. This guide assumes `/c/_dk/laravel`.
|
- you have installed Laravel as a parent of `laradock`. This guide assumes `/c/_dk/laravel`.
|
||||||
|
|
||||||
<a name="AddToHosts"></a>
|
<a name="AddToHosts"></a>
|
||||||
|
@ -332,7 +332,7 @@ xdebug.cli_color=1
|
||||||
|
|
||||||
<a name="InstallCleanHouse"></a>
|
<a name="InstallCleanHouse"></a>
|
||||||
### Need to clean house first?
|
### Need to clean house first?
|
||||||
Make sure you are starting with a clean state. For example, do you have other LaraDock containers and images?
|
Make sure you are starting with a clean state. For example, do you have other Laradock containers and images?
|
||||||
Here are a few things I use to clean things up.
|
Here are a few things I use to clean things up.
|
||||||
|
|
||||||
- Delete all containers using `grep laradock_` on the names, see: [Remove all containers based on docker image name](https://linuxconfig.org/remove-all-containners-based-on-docker-image-name).
|
- Delete all containers using `grep laradock_` on the names, see: [Remove all containers based on docker image name](https://linuxconfig.org/remove-all-containners-based-on-docker-image-name).
|
||||||
|
@ -340,7 +340,7 @@ Here are a few things I use to clean things up.
|
||||||
|
|
||||||
- Delete all images containing `laradock`.
|
- Delete all images containing `laradock`.
|
||||||
`docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}`
|
`docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}`
|
||||||
**Note:** This will only delete images that were built with `LaraDock`, **NOT** `laradock/*` which are pulled down by `LaraDock` such as `laradock/workspace`, etc.
|
**Note:** This will only delete images that were built with `Laradock`, **NOT** `laradock/*` which are pulled down by `Laradock` such as `laradock/workspace`, etc.
|
||||||
**Note:** Some may fail with:
|
**Note:** Some may fail with:
|
||||||
`Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images`
|
`Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images`
|
||||||
|
|
||||||
|
@ -359,7 +359,7 @@ Here are a few things I use to clean things up.
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
- If you frequently switch configurations for LaraDock, you may find that adding the following and added to your `.bashrc` or equivalent useful:
|
- If you frequently switch configurations for Laradock, you may find that adding the following and added to your `.bashrc` or equivalent useful:
|
||||||
```
|
```
|
||||||
# remove laravel* containers
|
# remove laravel* containers
|
||||||
# remove laravel_* images
|
# remove laravel_* images
|
||||||
|
@ -383,7 +383,7 @@ dcleanlaradockfunction()
|
||||||
alias dcleanlaradock=dcleanlaradockfunction
|
alias dcleanlaradock=dcleanlaradockfunction
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="InstallLaraDockDialTone"></a>
|
<a name="InstallLaradockDialTone"></a>
|
||||||
## Let's get a dial-tone with Laravel
|
## Let's get a dial-tone with Laravel
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -408,7 +408,7 @@ laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222-
|
||||||
|
|
||||||
<a name="enablePhpXdebug"></a>
|
<a name="enablePhpXdebug"></a>
|
||||||
## Enable xDebug on php-fpm
|
## Enable xDebug on php-fpm
|
||||||
In a host terminal sitting in the laradock folder, run: `./xdebugPhpFpm status`
|
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status`
|
||||||
You should see something like the following:
|
You should see something like the following:
|
||||||
```
|
```
|
||||||
xDebug status
|
xDebug status
|
||||||
|
@ -418,7 +418,7 @@ Copyright (c) 1997-2016 The PHP Group
|
||||||
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
|
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
|
||||||
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
|
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
|
||||||
```
|
```
|
||||||
Other commands include `./xdebugPhpFpm start | stop`.
|
Other commands include `.php-fpm/xdebug start | stop`.
|
||||||
|
|
||||||
If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will already be running when
|
If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will already be running when
|
||||||
`php-fpm` is started and listening for debug info on port 9000.
|
`php-fpm` is started and listening for debug info on port 9000.
|
||||||
|
@ -503,9 +503,9 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will
|
||||||
<a name="UsagePHPStormDebugSite"></a>
|
<a name="UsagePHPStormDebugSite"></a>
|
||||||
### Debug WebSite
|
### Debug WebSite
|
||||||
- In case xDebug is disabled, from the `laradock` folder run:
|
- In case xDebug is disabled, from the `laradock` folder run:
|
||||||
`./xdebugPhpFpm start`.
|
`.php-fpm/xdebug start`.
|
||||||
- To switch xdebug off, run:
|
- To switch xdebug off, run:
|
||||||
`./xdebugPhpFpm stop`
|
`.php-fpm/xdebug stop`
|
||||||
|
|
||||||
- Start Remote Debugging
|
- Start Remote Debugging
|
||||||
- ![DebugRemoteOn](photos/PHPStorm/DebugRemoteOn.png)
|
- ![DebugRemoteOn](photos/PHPStorm/DebugRemoteOn.png)
|
||||||
|
|
58
README-zh.md
58
README-zh.md
|
@ -1,14 +1,14 @@
|
||||||
# LaraDock
|
# Laradock
|
||||||
|
|
||||||
[![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://zalt.me)
|
[![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://zalt.me)
|
||||||
|
|
||||||
[![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)
|
||||||
|
|
||||||
LaraDock 能够帮你在 **Docker** 上快速搭建 **Laravel** 应用。
|
Laradock 能够帮你在 **Docker** 上快速搭建 **Laravel** 应用。
|
||||||
|
|
||||||
就像 Laravel Homestead 一样,但是 Docker 替换了 Vagrant。
|
就像 Laravel Homestead 一样,但是 Docker 替换了 Vagrant。
|
||||||
|
|
||||||
> 先在使用 LaraDock,然后再学习它们。
|
> 先在使用 Laradock,然后再学习它们。
|
||||||
|
|
||||||
## 目录
|
## 目录
|
||||||
- [Intro](#Intro)
|
- [Intro](#Intro)
|
||||||
|
@ -17,7 +17,7 @@ LaraDock 能够帮你在 **Docker** 上快速搭建 **Laravel** 应用。
|
||||||
- [What is Docker](#what-is-docker)
|
- [What is Docker](#what-is-docker)
|
||||||
- [What is Laravel](#what-is-laravel)
|
- [What is Laravel](#what-is-laravel)
|
||||||
- [Why Docker not Vagrant](#why-docker-not-vagrant)
|
- [Why Docker not Vagrant](#why-docker-not-vagrant)
|
||||||
- [LaraDock VS Homestead](#laradock-vs-homestead)
|
- [Laradock VS Homestead](#laradock-vs-homestead)
|
||||||
- [Demo Video](#Demo)
|
- [Demo Video](#Demo)
|
||||||
- [Requirements](#Requirements)
|
- [Requirements](#Requirements)
|
||||||
- [Installation](#Installation)
|
- [Installation](#Installation)
|
||||||
|
@ -49,27 +49,27 @@ LaraDock 能够帮你在 **Docker** 上快速搭建 **Laravel** 应用。
|
||||||
- [Install Prestissimo](#Install-Prestissimo)
|
- [Install Prestissimo](#Install-Prestissimo)
|
||||||
- [Install Node + NVM](#Install-Node)
|
- [Install Node + NVM](#Install-Node)
|
||||||
- [Debugging](#debugging)
|
- [Debugging](#debugging)
|
||||||
- [Upgrading LaraDock](#upgrading-laradock)
|
- [Upgrading Laradock](#upgrading-laradock)
|
||||||
- [Help & Questions](#Help)
|
- [Help & Questions](#Help)
|
||||||
|
|
||||||
|
|
||||||
<a name="Intro"></a>
|
<a name="Intro"></a>
|
||||||
## 介绍
|
## 介绍
|
||||||
|
|
||||||
LaraDock 努力简化创建开发环境过程。
|
Laradock 努力简化创建开发环境过程。
|
||||||
它包含预包装 Docker 镜像,提供你一个美妙的开发环境而不需要安装 PHP, NGINX, MySQL 和其他任何软件在你本地机器上。
|
它包含预包装 Docker 镜像,提供你一个美妙的开发环境而不需要安装 PHP, NGINX, MySQL 和其他任何软件在你本地机器上。
|
||||||
|
|
||||||
**使用概览:**
|
**使用概览:**
|
||||||
|
|
||||||
让我们了解使用它安装 `NGINX`, `PHP`, `Composer`, `MySQL` 和 `Redis`,然后运行 `Laravel`
|
让我们了解使用它安装 `NGINX`, `PHP`, `Composer`, `MySQL` 和 `Redis`,然后运行 `Laravel`
|
||||||
|
|
||||||
1. 将 LaraDock 放到你的 Laravel 项目中:
|
1. 将 Laradock 放到你的 Laravel 项目中:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/laradock/laradock.git
|
git clone https://github.com/laradock/laradock.git
|
||||||
```
|
```
|
||||||
|
|
||||||
2. 进入 LaraDock 目录,然后运行这些容器。
|
2. 进入 Laradock 目录,然后运行这些容器。
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose up -d nginx mysql redis
|
docker-compose up -d nginx mysql redis
|
||||||
|
@ -142,22 +142,22 @@ docker-compose up -d nginx mysql redis
|
||||||
最重要的是 Docker 可以运行在开发和生产(相同环境无处不在)。Vagrant 是专为开发,(所以在生产环境你必须每一次重建您的服务器)。
|
最重要的是 Docker 可以运行在开发和生产(相同环境无处不在)。Vagrant 是专为开发,(所以在生产环境你必须每一次重建您的服务器)。
|
||||||
|
|
||||||
<a name="laradock-vs-homestead"></a>
|
<a name="laradock-vs-homestead"></a>
|
||||||
### LaraDock Homestead 对比
|
### Laradock Homestead 对比
|
||||||
|
|
||||||
LaraDock and [Homestead](https://laravel.com/docs/master/homestead) 给你一个完整的虚拟开发环境。(不需要安装和配置软件在你自己的每一个操作系统)。
|
Laradock and [Homestead](https://laravel.com/docs/master/homestead) 给你一个完整的虚拟开发环境。(不需要安装和配置软件在你自己的每一个操作系统)。
|
||||||
|
|
||||||
Homestead 是一个工具,为你控制虚拟机(使用 Homestead 特殊命令)。Vagrant 可以管理你的管理虚容器。
|
Homestead 是一个工具,为你控制虚拟机(使用 Homestead 特殊命令)。Vagrant 可以管理你的管理虚容器。
|
||||||
|
|
||||||
运行一个虚拟容器比运行一整个虚拟机快多了 **LaraDock 比 Homestead 快多了**
|
运行一个虚拟容器比运行一整个虚拟机快多了 **Laradock 比 Homestead 快多了**
|
||||||
|
|
||||||
<a name="Demo"></a>
|
<a name="Demo"></a>
|
||||||
## 演示视频
|
## 演示视频
|
||||||
还有什么比**演示视频**好:
|
还有什么比**演示视频**好:
|
||||||
|
|
||||||
- LaraDock [v4.0](https://www.youtube.com/watch?v=TQii1jDa96Y)
|
- Laradock [v4.0](https://www.youtube.com/watch?v=TQii1jDa96Y)
|
||||||
- LaraDock [v2.2](https://www.youtube.com/watch?v=-DamFMczwDA)
|
- Laradock [v2.2](https://www.youtube.com/watch?v=-DamFMczwDA)
|
||||||
- LaraDock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
|
- Laradock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
|
||||||
- LaraDock [v0.1](https://www.youtube.com/watch?v=3YQsHe6oF80)
|
- Laradock [v0.1](https://www.youtube.com/watch?v=3YQsHe6oF80)
|
||||||
|
|
||||||
<a name="Requirements"></a>
|
<a name="Requirements"></a>
|
||||||
## 依赖
|
## 依赖
|
||||||
|
@ -168,7 +168,7 @@ Homestead 是一个工具,为你控制虚拟机(使用 Homestead 特殊命令)
|
||||||
<a name="Installation"></a>
|
<a name="Installation"></a>
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
1 - 克隆 `LaraDock` 仓库:
|
1 - 克隆 `Laradock` 仓库:
|
||||||
|
|
||||||
**A)** 如果你已经有一个 Laravel 项目,克隆这个仓库在到 `Laravel` 根目录
|
**A)** 如果你已经有一个 Laravel 项目,克隆这个仓库在到 `Laravel` 根目录
|
||||||
|
|
||||||
|
@ -189,9 +189,9 @@ git clone https://github.com/laradock/laradock.git
|
||||||
|
|
||||||
**请在开始之前阅读:**
|
**请在开始之前阅读:**
|
||||||
如果你正在使用 **Docker Toolbox** (VM),选择以下任何一个方法:
|
如果你正在使用 **Docker Toolbox** (VM),选择以下任何一个方法:
|
||||||
- 更新到 Docker [Native](https://www.docker.com/products/docker) Mac/Windows 版本 (建议). 查看 [Upgrading LaraDock](#upgrading-laradock)
|
- 更新到 Docker [Native](https://www.docker.com/products/docker) Mac/Windows 版本 (建议). 查看 [Upgrading Laradock](#upgrading-laradock)
|
||||||
- 使用 LaraDock v3.* (访问 `LaraDock-ToolBox` [分支](https://github.com/laradock/laradock/tree/LaraDock-ToolBox)).
|
- 使用 Laradock v3.* (访问 `Laradock-ToolBox` [分支](https://github.com/laradock/laradock/tree/Laradock-ToolBox)).
|
||||||
如果您使用的是 **Docker Native**(Mac / Windows 版本)甚至是 Linux 版本,通常可以继续阅读这个文档,LaraDock v4 以上版本将仅支持 **Docker Native**。
|
如果您使用的是 **Docker Native**(Mac / Windows 版本)甚至是 Linux 版本,通常可以继续阅读这个文档,Laradock v4 以上版本将仅支持 **Docker Native**。
|
||||||
|
|
||||||
1 - 运行容器: *(在运行 `docker-compose` 命令之前,确认你在 `laradock` 目录中*
|
1 - 运行容器: *(在运行 `docker-compose` 命令之前,确认你在 `laradock` 目录中*
|
||||||
|
|
||||||
|
@ -377,7 +377,7 @@ composer create-project laravel/laravel my-cool-app "5.2.*"
|
||||||
|
|
||||||
|
|
||||||
3 - 编辑 `docker-compose.yml` 映射新的应用目录:
|
3 - 编辑 `docker-compose.yml` 映射新的应用目录:
|
||||||
系统默认 LaraDock 假定 Laravel 应用在 laradock 的父级目录中
|
系统默认 Laradock 假定 Laravel 应用在 laradock 的父级目录中
|
||||||
|
|
||||||
更新 Laravel 应用在 `my-cool-app` 目录中, 我们需要用 `../my-cool-app/:/var/www`替换 `../:/var/www` , 如下:
|
更新 Laravel 应用在 `my-cool-app` 目录中, 我们需要用 `../my-cool-app/:/var/www`替换 `../:/var/www` , 如下:
|
||||||
|
|
||||||
|
@ -394,7 +394,7 @@ composer create-project laravel/laravel my-cool-app "5.2.*"
|
||||||
cd my-cool-app
|
cd my-cool-app
|
||||||
```
|
```
|
||||||
|
|
||||||
5 - 回到 LaraDock 安装步骤,看看如何编辑 `.env` 的文件。
|
5 - 回到 Laradock 安装步骤,看看如何编辑 `.env` 的文件。
|
||||||
|
|
||||||
<a name="Run-Artisan-Commands"></a>
|
<a name="Run-Artisan-Commands"></a>
|
||||||
### 运行 Artisan 命令
|
### 运行 Artisan 命令
|
||||||
|
@ -477,7 +477,7 @@ composer require predis/predis:^1.0
|
||||||
5 - 你可以用以下代码在 Laravel 中手动测试:
|
5 - 你可以用以下代码在 Laravel 中手动测试:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
\Cache::store('redis')->put('LaraDock', 'Awesome', 10);
|
\Cache::store('redis')->put('Laradock', 'Awesome', 10);
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="Use-Mongo"></a>
|
<a name="Use-Mongo"></a>
|
||||||
|
@ -766,15 +766,15 @@ sudo chmod -R 777 storage bootstrap/cache
|
||||||
确保你想运行的服务端口(80, 3306, etc.)不是已经被其他程序使用,例如 `apache`/`httpd` 服务或其他安装的开发工具
|
确保你想运行的服务端口(80, 3306, etc.)不是已经被其他程序使用,例如 `apache`/`httpd` 服务或其他安装的开发工具
|
||||||
|
|
||||||
<a name="upgrading-laradock"></a>
|
<a name="upgrading-laradock"></a>
|
||||||
### LaraDock 升级
|
### Laradock 升级
|
||||||
|
|
||||||
|
|
||||||
从 Docker Toolbox (VirtualBox) 移动到 Docker Native (for Mac/Windows),需要从 LaraDock v3.* 升级到 v4.*:
|
从 Docker Toolbox (VirtualBox) 移动到 Docker Native (for Mac/Windows),需要从 Laradock v3.* 升级到 v4.*:
|
||||||
|
|
||||||
1. 停止 Docker 虚拟机 `docker-machine stop {default}`
|
1. 停止 Docker 虚拟机 `docker-machine stop {default}`
|
||||||
2. 安装 Docker [Mac](https://docs.docker.com/docker-for-mac/) 或 [Windows](https://docs.docker.com/docker-for-windows/).
|
2. 安装 Docker [Mac](https://docs.docker.com/docker-for-mac/) 或 [Windows](https://docs.docker.com/docker-for-windows/).
|
||||||
3. 升级 LaraDock 到 `v4.*.*` (`git pull origin master`)
|
3. 升级 Laradock 到 `v4.*.*` (`git pull origin master`)
|
||||||
4. 像之前一样使用 LaraDock: `docker-compose up -d nginx mysql`.
|
4. 像之前一样使用 Laradock: `docker-compose up -d nginx mysql`.
|
||||||
|
|
||||||
**说明:** 如果你面临任何上面的问题的最后一步:重建你所有的容器
|
**说明:** 如果你面临任何上面的问题的最后一步:重建你所有的容器
|
||||||
```bash
|
```bash
|
||||||
|
@ -791,9 +791,9 @@ docker-compose build --no-cache
|
||||||
<a name="Help"></a>
|
<a name="Help"></a>
|
||||||
## 帮助 & 问题
|
## 帮助 & 问题
|
||||||
|
|
||||||
从聊天室 [Gitter](https://gitter.im/LaraDock/laradock) 社区获取帮助和支持.
|
从聊天室 [Gitter](https://gitter.im/Laradock/laradock) 社区获取帮助和支持.
|
||||||
|
|
||||||
你也可以打开 Github 上的 [issue](https://github.com/laradock/laradock/issues) (将被贴上问题和答案) 或与大家讨论 [Gitter](https://gitter.im/LaraDock/laradock).
|
你也可以打开 Github 上的 [issue](https://github.com/laradock/laradock/issues) (将被贴上问题和答案) 或与大家讨论 [Gitter](https://gitter.im/Laradock/laradock).
|
||||||
|
|
||||||
Docker 或 Laravel 的特别帮助,你可以在 [Codementor.io](https://www.codementor.io/mahmoudz) 上直接和项目创始人在线沟通
|
Docker 或 Laravel 的特别帮助,你可以在 [Codementor.io](https://www.codementor.io/mahmoudz) 上直接和项目创始人在线沟通
|
||||||
|
|
||||||
|
|
|
@ -607,12 +607,12 @@ xdebug.remote_connect_back=1
|
||||||
<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>
|
<ul>
|
||||||
<li>Stop xDebug from running by default: <code>./xdebugPhpFpm stop</code>.</li>
|
<li>Stop xDebug from running by default: <code>.php-fpm/xdebug stop</code>.</li>
|
||||||
<li>Start xDebug by default: <code>./xdebugPhpFpm start</code>.</li>
|
<li>Start xDebug by default: <code>.php-fpm/xdebug start</code>.</li>
|
||||||
<li>See the status: <code>./xdebugPhpFpm status</code>.</li>
|
<li>See the status: <code>.php-fpm/xdebug status</code>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>Note: If <code>./xdebugPhpFpm</code> doesn’t execute and gives <code>Permission Denied</code> error the problem can be that file <code>xdebugPhpFpm</code> doesn’t have execution access. This can be fixed by running <code>chmod</code> command with desired access permissions.</p>
|
<p>Note: If <code>.php-fpm/xdebug</code> doesn’t execute and gives <code>Permission Denied</code> error the problem can be that file <code>xdebug</code> doesn’t have execution access. This can be fixed by running <code>chmod</code> command with desired access permissions.</p>
|
||||||
|
|
||||||
<p><br>
|
<p><br>
|
||||||
<a name="Install-Deployer"></a></p>
|
<a name="Install-Deployer"></a></p>
|
||||||
|
|
|
@ -288,12 +288,12 @@ xdebug.remote_connect_back=1
|
||||||
<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>
|
<ul>
|
||||||
<li>Stop xDebug from running by default: <code>./xdebugPhpFpm stop</code>.</li>
|
<li>Stop xDebug from running by default: <code>.php-fpm/xdebug stop</code>.</li>
|
||||||
<li>Start xDebug by default: <code>./xdebugPhpFpm start</code>.</li>
|
<li>Start xDebug by default: <code>.php-fpm/xdebug start</code>.</li>
|
||||||
<li>See the status: <code>./xdebugPhpFpm status</code>.</li>
|
<li>See the status: <code>.php-fpm/xdebug status</code>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>Note: If <code>./xdebugPhpFpm</code> doesn&rsquo;t execute and gives <code>Permission Denied</code> error the problem can be that file <code>xdebugPhpFpm</code> doesn&rsquo;t have execution access. This can be fixed by running <code>chmod</code> command with desired access permissions.</p>
|
<p>Note: If <code>.php-fpm/xdebug</code> doesn&rsquo;t execute and gives <code>Permission Denied</code> error the problem can be that file <code>xdebug</code> doesn&rsquo;t have execution access. This can be fixed by running <code>chmod</code> command with desired access permissions.</p>
|
||||||
|
|
||||||
<p><br>
|
<p><br>
|
||||||
<a name="Install-Deployer"></a></p>
|
<a name="Install-Deployer"></a></p>
|
||||||
|
@ -1248,4 +1248,4 @@ e) set it to <code>true</code></p>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
||||||
|
|
|
@ -472,7 +472,7 @@
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
|
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
|
||||||
<li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">LaraDock-ToolBox</a> branch. <em>(outdated)</em></li>
|
<li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/Laradock-ToolBox">Laradock-ToolBox</a> branch. <em>(outdated)</em></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p><br></p>
|
<p><br></p>
|
||||||
|
|
|
@ -153,7 +153,7 @@
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
|
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
|
||||||
<li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">LaraDock-ToolBox</a> branch. <em>(outdated)</em></li>
|
<li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/Laradock-ToolBox">Laradock-ToolBox</a> branch. <em>(outdated)</em></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p><br></p>
|
<p><br></p>
|
||||||
|
@ -218,4 +218,4 @@
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
||||||
|
|
|
@ -614,7 +614,7 @@ PHP CLI - Composer - Git - Linuxbrew - Node - V8JS - Gulp - SQLite - xDebug - En
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
|
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
|
||||||
<li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">LaraDock-ToolBox</a> branch. <em>(outdated)</em></li>
|
<li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/Laradock-ToolBox">Laradock-ToolBox</a> branch. <em>(outdated)</em></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p><br></p>
|
<p><br></p>
|
||||||
|
@ -953,12 +953,12 @@ xdebug.remote_connect_back=1
|
||||||
<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>
|
<ul>
|
||||||
<li>Stop xDebug from running by default: <code>./xdebugPhpFpm stop</code>.</li>
|
<li>Stop xDebug from running by default: <code>.php-fpm/xdebug stop</code>.</li>
|
||||||
<li>Start xDebug by default: <code>./xdebugPhpFpm start</code>.</li>
|
<li>Start xDebug by default: <code>.php-fpm/xdebug start</code>.</li>
|
||||||
<li>See the status: <code>./xdebugPhpFpm status</code>.</li>
|
<li>See the status: <code>.php-fpm/xdebug status</code>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>Note: If <code>./xdebugPhpFpm</code> doesn’t execute and gives <code>Permission Denied</code> error the problem can be that file <code>xdebugPhpFpm</code> doesn’t have execution access. This can be fixed by running <code>chmod</code> command with desired access permissions.</p>
|
<p>Note: If <code>.php-fpm/xdebug</code> doesn’t execute and gives <code>Permission Denied</code> error the problem can be that file <code>xdebug</code> doesn’t have execution access. This can be fixed by running <code>chmod</code> command with desired access permissions.</p>
|
||||||
|
|
||||||
<p><br>
|
<p><br>
|
||||||
<a name="Install-Deployer"></a></p>
|
<a name="Install-Deployer"></a></p>
|
||||||
|
@ -1954,7 +1954,7 @@ e) set it to <code>true</code></p>
|
||||||
<pre><code>$root@server:~# apt-get install git
|
<pre><code>$root@server:~# apt-get install git
|
||||||
$root@server:~# git clone https://github.com/laravel/laravel
|
$root@server:~# git clone https://github.com/laravel/laravel
|
||||||
$root@server:~# cd laravel
|
$root@server:~# cd laravel
|
||||||
$root@server:~/laravel/ git submodule add https://github.com/LaraDock/laradock.git
|
$root@server:~/laravel/ git submodule add https://github.com/Laradock/laradock.git
|
||||||
$root@server:~/laravel/ cd laradock
|
$root@server:~/laravel/ cd laradock
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
|
@ -1964,7 +1964,7 @@ $root@server:~/laravel/ cd laradock
|
||||||
$root@server:~/chmod +x /usr/local/bin/docker-compose
|
$root@server:~/chmod +x /usr/local/bin/docker-compose
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h2 id="create-your-laradock-containers">Create Your LaraDock Containers</h2>
|
<h2 id="create-your-laradock-containers">Create Your Laradock Containers</h2>
|
||||||
|
|
||||||
<pre><code>$root@server:~/laravel/laradock# docker-compose up -d nginx mysql
|
<pre><code>$root@server:~/laravel/laradock# docker-compose up -d nginx mysql
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
@ -2144,7 +2144,7 @@ $root@server:~/laravel/laradock/caddy# docker-compose up -d mysql caddy
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#InstallCleanHouse">Clean House</a></li>
|
<li><a href="#InstallCleanHouse">Clean House</a></li>
|
||||||
<li><a href="#InstallLaraDockDialTone">LaraDock Dial Tone</a></li>
|
<li><a href="#InstallLaradockDialTone">Laradock Dial Tone</a></li>
|
||||||
<li><a href="#AddToHosts">hosts</a></li>
|
<li><a href="#AddToHosts">hosts</a></li>
|
||||||
<li><a href="#FireWall">Firewall</a></li>
|
<li><a href="#FireWall">Firewall</a></li>
|
||||||
<li><a href="#enablePhpXdebug">Enable xDebug on php-fpm</a></li>
|
<li><a href="#enablePhpXdebug">Enable xDebug on php-fpm</a></li>
|
||||||
|
@ -2177,7 +2177,7 @@ $root@server:~/laravel/laradock/caddy# docker-compose up -d mysql caddy
|
||||||
|
|
||||||
<h2 id="intro">Intro</h2>
|
<h2 id="intro">Intro</h2>
|
||||||
|
|
||||||
<p>Wiring up <a href="https://laravel.com/">Laravel</a>, <a href="https://github.com/LaraDock/laradock">LaraDock</a> [Laravel+Docker] and <a href="https://www.jetbrains.com/phpstorm/">PHPStorm</a> to play nice together complete with remote xdebug’ing as icing on top! Although this guide is based on <code>PHPStorm Windows</code>,
|
<p>Wiring up <a href="https://laravel.com/">Laravel</a>, <a href="https://github.com/Laradock/laradock">Laradock</a> [Laravel+Docker] and <a href="https://www.jetbrains.com/phpstorm/">PHPStorm</a> to play nice together complete with remote xdebug’ing as icing on top! Although this guide is based on <code>PHPStorm Windows</code>,
|
||||||
you should be able to adjust accordingly. This guide was written based on Docker for Windows Native.</p>
|
you should be able to adjust accordingly. This guide was written based on Docker for Windows Native.</p>
|
||||||
|
|
||||||
<p><a name="Installation"></a></p>
|
<p><a name="Installation"></a></p>
|
||||||
|
@ -2188,7 +2188,7 @@ you should be able to adjust accordingly. This guide was written based on Docker
|
||||||
<li>This guide assumes the following:
|
<li>This guide assumes the following:
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>you have already installed and are familiar with Laravel, LaraDock and PHPStorm.</li>
|
<li>you have already installed and are familiar with Laravel, Laradock and PHPStorm.</li>
|
||||||
<li>you have installed Laravel as a parent of <code>laradock</code>. This guide assumes <code>/c/_dk/laravel</code>.</li>
|
<li>you have installed Laravel as a parent of <code>laradock</code>. This guide assumes <code>/c/_dk/laravel</code>.</li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -2268,7 +2268,7 @@ xdebug.cli_color=1
|
||||||
|
|
||||||
<h3 id="need-to-clean-house-first">Need to clean house first?</h3>
|
<h3 id="need-to-clean-house-first">Need to clean house first?</h3>
|
||||||
|
|
||||||
<p>Make sure you are starting with a clean state. For example, do you have other LaraDock containers and images?
|
<p>Make sure you are starting with a clean state. For example, do you have other Laradock containers and images?
|
||||||
Here are a few things I use to clean things up.</p>
|
Here are a few things I use to clean things up.</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -2277,7 +2277,7 @@ Here are a few things I use to clean things up.</p>
|
||||||
|
|
||||||
<li><p>Delete all images containing <code>laradock</code>.
|
<li><p>Delete all images containing <code>laradock</code>.
|
||||||
<code>docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}</code>
|
<code>docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}</code>
|
||||||
<strong>Note:</strong> This will only delete images that were built with <code>LaraDock</code>, <strong>NOT</strong> <code>laradock/*</code> which are pulled down by <code>LaraDock</code> such as <code>laradock/workspace</code>, etc.
|
<strong>Note:</strong> This will only delete images that were built with <code>Laradock</code>, <strong>NOT</strong> <code>laradock/*</code> which are pulled down by <code>Laradock</code> such as <code>laradock/workspace</code>, etc.
|
||||||
<strong>Note:</strong> Some may fail with:
|
<strong>Note:</strong> Some may fail with:
|
||||||
<code>Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images</code></p></li>
|
<code>Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images</code></p></li>
|
||||||
|
|
||||||
|
@ -2296,7 +2296,7 @@ Here are a few things I use to clean things up.</p>
|
||||||
}
|
}
|
||||||
</code></pre></li>
|
</code></pre></li>
|
||||||
|
|
||||||
<li><p>If you frequently switch configurations for LaraDock, you may find that adding the following and added to your <code>.bashrc</code> or equivalent useful:
|
<li><p>If you frequently switch configurations for Laradock, you may find that adding the following and added to your <code>.bashrc</code> or equivalent useful:
|
||||||
```</p>
|
```</p>
|
||||||
|
|
||||||
<h1 id="remove-laravel-containers">remove laravel* containers</h1>
|
<h1 id="remove-laravel-containers">remove laravel* containers</h1>
|
||||||
|
@ -2327,7 +2327,7 @@ Here are a few things I use to clean things up.</p>
|
||||||
<p>alias dcleanlaradock=dcleanlaradockfunction</p>
|
<p>alias dcleanlaradock=dcleanlaradockfunction</p>
|
||||||
|
|
||||||
<pre><code>
|
<pre><code>
|
||||||
<a name="InstallLaraDockDialTone"></a>
|
<a name="InstallLaradockDialTone"></a>
|
||||||
## Let's get a dial-tone with Laravel
|
## Let's get a dial-tone with Laravel
|
||||||
|
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
@ -2357,7 +2357,7 @@ laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222-
|
||||||
<pre><code>
|
<pre><code>
|
||||||
<a name="enablePhpXdebug"></a>
|
<a name="enablePhpXdebug"></a>
|
||||||
## Enable xDebug on php-fpm
|
## Enable xDebug on php-fpm
|
||||||
In a host terminal sitting in the laradock folder, run: `./xdebugPhpFpm status`
|
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status`
|
||||||
You should see something like the following:
|
You should see something like the following:
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
|
@ -2368,7 +2368,7 @@ Copyright © 1997-2016 The PHP Group
|
||||||
Zend Engine v3.0.0, Copyright © 1998-2016 Zend Technologies
|
Zend Engine v3.0.0, Copyright © 1998-2016 Zend Technologies
|
||||||
with Xdebug v2.4.1, Copyright © 2002-2016, by Derick Rethans
|
with Xdebug v2.4.1, Copyright © 2002-2016, by Derick Rethans
|
||||||
``<code>
|
``<code>
|
||||||
Other commands include</code>./xdebugPhpFpm start | stop`.</p>
|
Other commands include</code>.php-fpm/xdebug start | stop`.</p>
|
||||||
|
|
||||||
<p>If you have enabled <code>xdebug=true</code> in <code>docker-compose.yml/php-fpm</code>, <code>xdebug</code> will already be running when
|
<p>If you have enabled <code>xdebug=true</code> in <code>docker-compose.yml/php-fpm</code>, <code>xdebug</code> will already be running when
|
||||||
<code>php-fpm</code> is started and listening for debug info on port 9000.</p>
|
<code>php-fpm</code> is started and listening for debug info on port 9000.</p>
|
||||||
|
@ -2519,11 +2519,11 @@ Edit: <code>C:\Windows\System32\drivers\etc\hosts</code>.</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><p>In case xDebug is disabled, from the <code>laradock</code> folder run:
|
<li><p>In case xDebug is disabled, from the <code>laradock</code> folder run:
|
||||||
<code>./xdebugPhpFpm start</code>.</p>
|
<code>.php-fpm/xdebug start</code>.</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>To switch xdebug off, run:
|
<li>To switch xdebug off, run:
|
||||||
<code>./xdebugPhpFpm stop</code></li>
|
<code>.php-fpm/xdebug stop</code></li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
|
|
||||||
<li><p>Start Remote Debugging</p>
|
<li><p>Start Remote Debugging</p>
|
||||||
|
|
|
@ -299,7 +299,7 @@ PHP CLI - Composer - Git - Linuxbrew - Node - V8JS - Gulp - SQLite - xDebug - En
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
|
<li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
|
||||||
<li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">LaraDock-ToolBox</a> branch. <em>(outdated)</em></li>
|
<li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/Laradock-ToolBox">Laradock-ToolBox</a> branch. <em>(outdated)</em></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p><br></p>
|
<p><br></p>
|
||||||
|
@ -643,12 +643,12 @@ xdebug.remote_connect_back=1
|
||||||
<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>
|
<ul>
|
||||||
<li>Stop xDebug from running by default: <code>./xdebugPhpFpm stop</code>.</li>
|
<li>Stop xDebug from running by default: <code>.php-fpm/xdebug stop</code>.</li>
|
||||||
<li>Start xDebug by default: <code>./xdebugPhpFpm start</code>.</li>
|
<li>Start xDebug by default: <code>.php-fpm/xdebug start</code>.</li>
|
||||||
<li>See the status: <code>./xdebugPhpFpm status</code>.</li>
|
<li>See the status: <code>.php-fpm/xdebug status</code>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>Note: If <code>./xdebugPhpFpm</code> doesn&rsquo;t execute and gives <code>Permission Denied</code> error the problem can be that file <code>xdebugPhpFpm</code> doesn&rsquo;t have execution access. This can be fixed by running <code>chmod</code> command with desired access permissions.</p>
|
<p>Note: If <code>.php-fpm/xdebug</code> doesn&rsquo;t execute and gives <code>Permission Denied</code> error the problem can be that file <code>xdebug</code> doesn&rsquo;t have execution access. This can be fixed by running <code>chmod</code> command with desired access permissions.</p>
|
||||||
|
|
||||||
<p><br>
|
<p><br>
|
||||||
<a name="Install-Deployer"></a></p>
|
<a name="Install-Deployer"></a></p>
|
||||||
|
@ -1649,7 +1649,7 @@ e) set it to <code>true</code></p>
|
||||||
<pre><code>$root@server:~# apt-get install git
|
<pre><code>$root@server:~# apt-get install git
|
||||||
$root@server:~# git clone https://github.com/laravel/laravel
|
$root@server:~# git clone https://github.com/laravel/laravel
|
||||||
$root@server:~# cd laravel
|
$root@server:~# cd laravel
|
||||||
$root@server:~/laravel/ git submodule add https://github.com/LaraDock/laradock.git
|
$root@server:~/laravel/ git submodule add https://github.com/Laradock/laradock.git
|
||||||
$root@server:~/laravel/ cd laradock
|
$root@server:~/laravel/ cd laradock
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
|
@ -1659,7 +1659,7 @@ $root@server:~/laravel/ cd laradock
|
||||||
$root@server:~/chmod +x /usr/local/bin/docker-compose
|
$root@server:~/chmod +x /usr/local/bin/docker-compose
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<h2 id="create-your-laradock-containers">Create Your LaraDock Containers</h2>
|
<h2 id="create-your-laradock-containers">Create Your Laradock Containers</h2>
|
||||||
|
|
||||||
<pre><code>$root@server:~/laravel/laradock# docker-compose up -d nginx mysql
|
<pre><code>$root@server:~/laravel/laradock# docker-compose up -d nginx mysql
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
@ -1839,7 +1839,7 @@ $root@server:~/laravel/laradock/caddy# docker-compose up -d mysql caddy
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#InstallCleanHouse">Clean House</a></li>
|
<li><a href="#InstallCleanHouse">Clean House</a></li>
|
||||||
<li><a href="#InstallLaraDockDialTone">LaraDock Dial Tone</a></li>
|
<li><a href="#InstallLaradockDialTone">Laradock Dial Tone</a></li>
|
||||||
<li><a href="#AddToHosts">hosts</a></li>
|
<li><a href="#AddToHosts">hosts</a></li>
|
||||||
<li><a href="#FireWall">Firewall</a></li>
|
<li><a href="#FireWall">Firewall</a></li>
|
||||||
<li><a href="#enablePhpXdebug">Enable xDebug on php-fpm</a></li>
|
<li><a href="#enablePhpXdebug">Enable xDebug on php-fpm</a></li>
|
||||||
|
@ -1872,7 +1872,7 @@ $root@server:~/laravel/laradock/caddy# docker-compose up -d mysql caddy
|
||||||
|
|
||||||
<h2 id="intro">Intro</h2>
|
<h2 id="intro">Intro</h2>
|
||||||
|
|
||||||
<p>Wiring up <a href="https://laravel.com/">Laravel</a>, <a href="https://github.com/LaraDock/laradock">LaraDock</a> [Laravel+Docker] and <a href="https://www.jetbrains.com/phpstorm/">PHPStorm</a> to play nice together complete with remote xdebug&rsquo;ing as icing on top! Although this guide is based on <code>PHPStorm Windows</code>,
|
<p>Wiring up <a href="https://laravel.com/">Laravel</a>, <a href="https://github.com/Laradock/laradock">Laradock</a> [Laravel+Docker] and <a href="https://www.jetbrains.com/phpstorm/">PHPStorm</a> to play nice together complete with remote xdebug&rsquo;ing as icing on top! Although this guide is based on <code>PHPStorm Windows</code>,
|
||||||
you should be able to adjust accordingly. This guide was written based on Docker for Windows Native.</p>
|
you should be able to adjust accordingly. This guide was written based on Docker for Windows Native.</p>
|
||||||
|
|
||||||
<p><a name="Installation"></a></p>
|
<p><a name="Installation"></a></p>
|
||||||
|
@ -1883,7 +1883,7 @@ you should be able to adjust accordingly. This guide was written based on Docker
|
||||||
<li>This guide assumes the following:
|
<li>This guide assumes the following:
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>you have already installed and are familiar with Laravel, LaraDock and PHPStorm.</li>
|
<li>you have already installed and are familiar with Laravel, Laradock and PHPStorm.</li>
|
||||||
<li>you have installed Laravel as a parent of <code>laradock</code>. This guide assumes <code>/c/_dk/laravel</code>.</li>
|
<li>you have installed Laravel as a parent of <code>laradock</code>. This guide assumes <code>/c/_dk/laravel</code>.</li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1963,7 +1963,7 @@ xdebug.cli_color=1
|
||||||
|
|
||||||
<h3 id="need-to-clean-house-first">Need to clean house first?</h3>
|
<h3 id="need-to-clean-house-first">Need to clean house first?</h3>
|
||||||
|
|
||||||
<p>Make sure you are starting with a clean state. For example, do you have other LaraDock containers and images?
|
<p>Make sure you are starting with a clean state. For example, do you have other Laradock containers and images?
|
||||||
Here are a few things I use to clean things up.</p>
|
Here are a few things I use to clean things up.</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -1972,7 +1972,7 @@ Here are a few things I use to clean things up.</p>
|
||||||
|
|
||||||
<li><p>Delete all images containing <code>laradock</code>.
|
<li><p>Delete all images containing <code>laradock</code>.
|
||||||
<code>docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}</code>
|
<code>docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}</code>
|
||||||
<strong>Note:</strong> This will only delete images that were built with <code>LaraDock</code>, <strong>NOT</strong> <code>laradock/*</code> which are pulled down by <code>LaraDock</code> such as <code>laradock/workspace</code>, etc.
|
<strong>Note:</strong> This will only delete images that were built with <code>Laradock</code>, <strong>NOT</strong> <code>laradock/*</code> which are pulled down by <code>Laradock</code> such as <code>laradock/workspace</code>, etc.
|
||||||
<strong>Note:</strong> Some may fail with:
|
<strong>Note:</strong> Some may fail with:
|
||||||
<code>Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images</code></p></li>
|
<code>Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images</code></p></li>
|
||||||
|
|
||||||
|
@ -1991,7 +1991,7 @@ Here are a few things I use to clean things up.</p>
|
||||||
}
|
}
|
||||||
</code></pre></li>
|
</code></pre></li>
|
||||||
|
|
||||||
<li><p>If you frequently switch configurations for LaraDock, you may find that adding the following and added to your <code>.bashrc</code> or equivalent useful:
|
<li><p>If you frequently switch configurations for Laradock, you may find that adding the following and added to your <code>.bashrc</code> or equivalent useful:
|
||||||
```</p>
|
```</p>
|
||||||
|
|
||||||
<h1 id="remove-laravel-containers">remove laravel* containers</h1>
|
<h1 id="remove-laravel-containers">remove laravel* containers</h1>
|
||||||
|
@ -2022,7 +2022,7 @@ Here are a few things I use to clean things up.</p>
|
||||||
<p>alias dcleanlaradock=dcleanlaradockfunction</p>
|
<p>alias dcleanlaradock=dcleanlaradockfunction</p>
|
||||||
|
|
||||||
<pre><code>
|
<pre><code>
|
||||||
&lt;a name=&quot;InstallLaraDockDialTone&quot;&gt;&lt;/a&gt;
|
&lt;a name=&quot;InstallLaradockDialTone&quot;&gt;&lt;/a&gt;
|
||||||
## Let's get a dial-tone with Laravel
|
## Let's get a dial-tone with Laravel
|
||||||
|
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
@ -2052,7 +2052,7 @@ laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222-
|
||||||
<pre><code>
|
<pre><code>
|
||||||
&lt;a name=&quot;enablePhpXdebug&quot;&gt;&lt;/a&gt;
|
&lt;a name=&quot;enablePhpXdebug&quot;&gt;&lt;/a&gt;
|
||||||
## Enable xDebug on php-fpm
|
## Enable xDebug on php-fpm
|
||||||
In a host terminal sitting in the laradock folder, run: `./xdebugPhpFpm status`
|
In a host terminal sitting in the laradock folder, run: `.php-fpm/xdebug status`
|
||||||
You should see something like the following:
|
You should see something like the following:
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
|
@ -2063,7 +2063,7 @@ Copyright &copy; 1997-2016 The PHP Group
|
||||||
Zend Engine v3.0.0, Copyright &copy; 1998-2016 Zend Technologies
|
Zend Engine v3.0.0, Copyright &copy; 1998-2016 Zend Technologies
|
||||||
with Xdebug v2.4.1, Copyright &copy; 2002-2016, by Derick Rethans
|
with Xdebug v2.4.1, Copyright &copy; 2002-2016, by Derick Rethans
|
||||||
``<code>
|
``<code>
|
||||||
Other commands include</code>./xdebugPhpFpm start | stop`.</p>
|
Other commands include</code>.php-fpm/xdebug start | stop`.</p>
|
||||||
|
|
||||||
<p>If you have enabled <code>xdebug=true</code> in <code>docker-compose.yml/php-fpm</code>, <code>xdebug</code> will already be running when
|
<p>If you have enabled <code>xdebug=true</code> in <code>docker-compose.yml/php-fpm</code>, <code>xdebug</code> will already be running when
|
||||||
<code>php-fpm</code> is started and listening for debug info on port 9000.</p>
|
<code>php-fpm</code> is started and listening for debug info on port 9000.</p>
|
||||||
|
@ -2214,11 +2214,11 @@ Edit: <code>C:\Windows\System32\drivers\etc\hosts</code>.</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><p>In case xDebug is disabled, from the <code>laradock</code> folder run:
|
<li><p>In case xDebug is disabled, from the <code>laradock</code> folder run:
|
||||||
<code>./xdebugPhpFpm start</code>.</p>
|
<code>.php-fpm/xdebug start</code>.</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>To switch xdebug off, run:
|
<li>To switch xdebug off, run:
|
||||||
<code>./xdebugPhpFpm stop</code></li>
|
<code>.php-fpm/xdebug stop</code></li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
|
|
||||||
<li><p>Start Remote Debugging</p>
|
<li><p>Start Remote Debugging</p>
|
||||||
|
@ -2514,4 +2514,4 @@ git push origin my-fix-branch -f
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
</channel>
|
</channel>
|
||||||
</rss>
|
</rss>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# To edit the 'php-fpm' base Image, visit its repository on Github
|
# To edit the 'php-fpm' base Image, visit its repository on Github
|
||||||
# https://github.com/LaraDock/php-fpm
|
# https://github.com/Laradock/php-fpm
|
||||||
#
|
#
|
||||||
# To change its version, see the available Tags on the Docker Hub:
|
# To change its version, see the available Tags on the Docker Hub:
|
||||||
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
||||||
|
@ -22,7 +22,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
||||||
# are installed on the base image 'laradock/php-fpm' image. If you want
|
# are installed on the base image 'laradock/php-fpm' image. If you want
|
||||||
# to add more Software's or remove existing one, you need to edit the
|
# to add more Software's or remove existing one, you need to edit the
|
||||||
# base image (https://github.com/LaraDock/php-fpm).
|
# base image (https://github.com/Laradock/php-fpm).
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# To edit the 'php-fpm' base Image, visit its repository on Github
|
# To edit the 'php-fpm' base Image, visit its repository on Github
|
||||||
# https://github.com/LaraDock/php-fpm
|
# https://github.com/Laradock/php-fpm
|
||||||
#
|
#
|
||||||
# To change its version, see the available Tags on the Docker Hub:
|
# To change its version, see the available Tags on the Docker Hub:
|
||||||
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
||||||
|
@ -22,7 +22,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
||||||
# are installed on the base image 'laradock/php-fpm' image. If you want
|
# are installed on the base image 'laradock/php-fpm' image. If you want
|
||||||
# to add more Software's or remove existing one, you need to edit the
|
# to add more Software's or remove existing one, you need to edit the
|
||||||
# base image (https://github.com/LaraDock/php-fpm).
|
# base image (https://github.com/Laradock/php-fpm).
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# To edit the 'php-fpm' base Image, visit its repository on Github
|
# To edit the 'php-fpm' base Image, visit its repository on Github
|
||||||
# https://github.com/LaraDock/php-fpm
|
# https://github.com/Laradock/php-fpm
|
||||||
#
|
#
|
||||||
# To change its version, see the available Tags on the Docker Hub:
|
# To change its version, see the available Tags on the Docker Hub:
|
||||||
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
# https://hub.docker.com/r/laradock/php-fpm/tags/
|
||||||
|
@ -22,7 +22,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
# Mandatory Software's such as ("mcrypt", "pdo_mysql", "libssl-dev", ....)
|
||||||
# are installed on the base image 'laradock/php-fpm' image. If you want
|
# are installed on the base image 'laradock/php-fpm' image. If you want
|
||||||
# to add more Software's or remove existing one, you need to edit the
|
# to add more Software's or remove existing one, you need to edit the
|
||||||
# base image (https://github.com/LaraDock/php-fpm).
|
# base image (https://github.com/Laradock/php-fpm).
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -94,7 +94,7 @@ case $@ in
|
||||||
echo "xDebug [Stop | Start | Status] in the ${PHP_FPM_CONTAINER} container."
|
echo "xDebug [Stop | Start | Status] in the ${PHP_FPM_CONTAINER} container."
|
||||||
echo "xDebug must have already been installed."
|
echo "xDebug must have already been installed."
|
||||||
echo "Usage:"
|
echo "Usage:"
|
||||||
echo " ./xdebugPhpFpm stop|start|status"
|
echo " .php-fpm/xdebug stop|start|status"
|
||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# To edit the 'workspace' base Image, visit its repository on Github
|
# To edit the 'workspace' base Image, visit its repository on Github
|
||||||
# https://github.com/LaraDock/workspace
|
# https://github.com/Laradock/workspace
|
||||||
#
|
#
|
||||||
# To change its version, see the available Tags on the Docker Hub:
|
# To change its version, see the available Tags on the Docker Hub:
|
||||||
# https://hub.docker.com/r/laradock/workspace/tags/
|
# https://hub.docker.com/r/laradock/workspace/tags/
|
||||||
|
@ -22,7 +22,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
# Mandatory Software's such as ("php5.6-cli", "git", "vim", ....) are
|
# Mandatory Software's such as ("php5.6-cli", "git", "vim", ....) are
|
||||||
# installed on the base image 'laradock/workspace' image. If you want
|
# installed on the base image 'laradock/workspace' image. If you want
|
||||||
# to add more Software's or remove existing one, you need to edit the
|
# to add more Software's or remove existing one, you need to edit the
|
||||||
# base image (https://github.com/LaraDock/workspace).
|
# base image (https://github.com/Laradock/workspace).
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# To edit the 'workspace' base Image, visit its repository on Github
|
# To edit the 'workspace' base Image, visit its repository on Github
|
||||||
# https://github.com/LaraDock/workspace
|
# https://github.com/Laradock/workspace
|
||||||
#
|
#
|
||||||
# To change its version, see the available Tags on the Docker Hub:
|
# To change its version, see the available Tags on the Docker Hub:
|
||||||
# https://hub.docker.com/r/laradock/workspace/tags/
|
# https://hub.docker.com/r/laradock/workspace/tags/
|
||||||
|
@ -22,7 +22,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
# Mandatory Software's such as ("php7.0-cli", "git", "vim", ....) are
|
# Mandatory Software's such as ("php7.0-cli", "git", "vim", ....) are
|
||||||
# installed on the base image 'laradock/workspace' image. If you want
|
# installed on the base image 'laradock/workspace' image. If you want
|
||||||
# to add more Software's or remove existing one, you need to edit the
|
# to add more Software's or remove existing one, you need to edit the
|
||||||
# base image (https://github.com/LaraDock/workspace).
|
# base image (https://github.com/Laradock/workspace).
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# To edit the 'workspace' base Image, visit its repository on Github
|
# To edit the 'workspace' base Image, visit its repository on Github
|
||||||
# https://github.com/LaraDock/workspace
|
# https://github.com/Laradock/workspace
|
||||||
#
|
#
|
||||||
# To change its version, see the available Tags on the Docker Hub:
|
# To change its version, see the available Tags on the Docker Hub:
|
||||||
# https://hub.docker.com/r/laradock/workspace/tags/
|
# https://hub.docker.com/r/laradock/workspace/tags/
|
||||||
|
@ -23,7 +23,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
|
||||||
# Mandatory Software's such as ("php7.1-cli", "git", "vim", ....) are
|
# Mandatory Software's such as ("php7.1-cli", "git", "vim", ....) are
|
||||||
# installed on the base image 'laradock/workspace' image. If you want
|
# installed on the base image 'laradock/workspace' image. If you want
|
||||||
# to add more Software's or remove existing one, you need to edit the
|
# to add more Software's or remove existing one, you need to edit the
|
||||||
# base image (https://github.com/LaraDock/workspace).
|
# base image (https://github.com/Laradock/workspace).
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue