Merge branch 'master' into varnish

This commit is contained in:
Shao Yu-Lung (Allen)
2020-02-03 16:14:17 +08:00
committed by GitHub
46 changed files with 2930 additions and 1195 deletions

View File

@ -76,7 +76,7 @@ docker-compose exec mysql bash
*Example: enter to MySQL prompt within MySQL container*
```bash
docker-compose exec mysql mysql -u homestead -psecret
docker-compose exec mysql mysql -udefault -psecret
```
3 - To exit a container, type `exit`.
@ -272,10 +272,6 @@ docker-compose build workspace
```
<br>
<a name="Install-xDebug"></a>
## Install xDebug
@ -314,6 +310,29 @@ Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error t
<br>
<a name="Install-pcov"></a>
## Install pcov
1 - First install `pcov` in the Workspace and the PHP-FPM Containers:
<br>
a) open the `.env` file
<br>
b) search for the `WORKSPACE_INSTALL_PCOV` argument under the Workspace Container
<br>
c) set it to `true`
<br>
d) search for the `PHP_FPM_INSTALL_PCOV` argument under the PHP-FPM Container
<br>
e) set it to `true`
2 - Re-build the containers `docker-compose build workspace php-fpm`
Note that pcov is only supported on PHP 7.1 or newer. For more information on setting up pcov optimally, check the recommended section
of the [README](https://github.com/krakjoe/pcov)
<br>
<a name="Install-phpdbg"></a>
## Install phpdbg
@ -536,7 +555,7 @@ Note: Should add `--user=laradock` (example `docker-compose exec --user=laradock
php artisan
```
```bash
Composer update
composer update
```
```bash
phpunit
@ -1114,6 +1133,7 @@ _Note: You can customize the port on which beanstalkd console is listening by ch
<br>
<a name="Use-Confluence"></a>
## Use Confluence
1 - Run the Confluence Container (`confluence`) with the `docker-compose up` command. Example:
@ -1128,6 +1148,15 @@ docker-compose up -d confluence
You can set custom confluence version in `CONFLUENCE_VERSION`. [Find more info in section 'Versioning'](https://hub.docker.com/r/atlassian/confluence-server/)
##### Confluence usage with Nginx and SSL.
1. Find an instance configuration file in `nginx/sites/confluence.conf.example` and replace sample domain with yours.
2. Configure ssl keys to your domain.
Keep in mind that Confluence is still accessible on 8090 anyway.
<br>
<a name="Use-ElasticSearch"></a>
## Use ElasticSearch
@ -1560,6 +1589,13 @@ To add locales to the container:
4 - Check enabled locales with `docker-compose exec php-fpm locale -a`
Update the locale setting, default is `POSIX`
1 - Open the `.env` file and set `PHP_FPM_DEFAULT_LOCALE` to `en_US.UTF8` or other locale you want.
2 - Re-build your PHP-FPM Container `docker-compose build php-fpm`.
3 - Check the default locale with `docker-compose exec php-fpm locale`
<br>
@ -1645,7 +1681,7 @@ The default username and password for the root MySQL user are `root` and `root `
1 - Enter the MySQL container: `docker-compose exec mysql bash`.
2 - Enter mysql: `mysql -uroot -proot` for non root access use `mysql -uhomestead -psecret`.
2 - Enter mysql: `mysql -uroot -proot` for non root access use `mysql -udefault -psecret`.
3 - See all users: `SELECT User FROM mysql.user;`
@ -1935,6 +1971,29 @@ To install GNU Parallel in the Workspace container
<br>
<a name="Install-Supervisor"></a>
## Install Supervisor
Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems.
(see http://supervisord.org/index.html)
To install Supervisor in the Workspace container
1 - Open the `.env` file
2 - Set `WORKSPACE_INSTALL_SUPERVISOR` and `WORKSPACE_INSTALL_PYTHON` to `true`.
3 - Create supervisor configuration file (for ex., named `laravel-worker.conf`) for Laravel Queue Worker in `php-worker/supervisord.d/` by simply copy from `laravel-worker.conf.example`
4 - Re-build the container `docker-compose build workspace` Or `docker-composer up --build -d workspace`
<br>
<a name="Common-Aliases"></a>
<br>
@ -2043,6 +2102,26 @@ YAML PHP extension allows you to easily parse and create YAML structured data. I
4 - Re-build the container `docker-compose build php-fpm`<br>
<br>
<a name="Install-AST"></a>
## Install AST PHP extension
AST exposes the abstract syntax tree generated by PHP 7+. This extension is required by tools such as `Phan`, a static analyzer for PHP.
1 - Open the `.env` file
2 - Search for the `WORKSPACE_INSTALL_AST` argument under the Workspace Container
3 - Set it to `true`
4 - Re-build the container `docker-compose build workspace`
**Note** If you need a specific version of AST then search for the `WORKSPACE_AST_VERSION` argument under the Workspace Container and set it to the desired version and continue step 4.
<br>
<a name="phpstorm-debugging"></a>
## PHPStorm Debugging Guide
@ -2052,6 +2131,19 @@ Remote debug Laravel web and phpunit tests.
<br>
<a name="Setup-gcloud"></a>
## Setup Google Cloud for docker registry
```
gcloud auth configure-docker
```
Login to gcloud for use the registry and auth the permission.
```
gcloud auth login
```