Merge branch 'master' into add-tomcat
This commit is contained in:
commit
ed92e61818
6
.github/FUNDING.yml
vendored
Normal file
6
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# DO NOT CHANGE THIS FILE PLEASE.
|
||||||
|
|
||||||
|
open_collective: laradock
|
||||||
|
ko_fi: laradock
|
||||||
|
issuehunt: laradock
|
||||||
|
custom: ['beerpay.io/laradock/laradock', 'paypal.me/mzmmzz']
|
50
.github/README.md
vendored
50
.github/README.md
vendored
@ -2,7 +2,7 @@
|
|||||||
<img src="/.github/home-page-images/laradock-logo.jpg?raw=true" alt="Laradock Logo"/>
|
<img src="/.github/home-page-images/laradock-logo.jpg?raw=true" alt="Laradock Logo"/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">A Docker PHP development environment that facilitates running PHP Apps on Docker</p>
|
<p align="center">PHP development environment that runs on Docker</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://travis-ci.org/laradock/laradock"><img src="https://travis-ci.org/laradock/laradock.svg?branch=master" alt="Build status"></a>
|
<a href="https://travis-ci.org/laradock/laradock"><img src="https://travis-ci.org/laradock/laradock.svg?branch=master" alt="Build status"></a>
|
||||||
@ -13,10 +13,10 @@
|
|||||||
<a href="http://laradock.io/contributing"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="contributions welcome"></a>
|
<a href="http://laradock.io/contributing"><img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="contributions welcome"></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h4 align="center" style="color:#7d58c2">Use Docker First And Learn About It Later</h4>
|
<h4 align="center" style="color:#7d58c2">Use Docker First - Then Learn About It Later</h4>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="http://zalt.me"><img src="http://forthebadge.com/images/badges/built-by-developers.svg" alt="forthebadge" width="240" ></a>
|
<a href="http://zalt.me"><img src="http://forthebadge.com/images/badges/built-by-developers.svg" alt="forthebadge" width="240"></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
@ -24,17 +24,20 @@
|
|||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="http://laradock.io">
|
<a href="http://laradock.io">
|
||||||
<img src="https://s19.postimg.org/ecnn9vdw3/Screen_Shot_2017-08-01_at_5.08.54_AM.png" width=300px" alt="Laradock Docs"/>
|
<img src="https://raw.githubusercontent.com/laradock/laradock/master/.github/home-page-images/documentation-button.png" width="300px" alt="Laradock Documentation"/>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
## Sponsors
|
||||||
|
|
||||||
## Sponsors
|
<p align="center">
|
||||||
|
<!-- Golden Sponsors -->
|
||||||
Support this project by becoming a sponsor.
|
<a href="https://edubirdie.com/?ref=Laradock" target="_blank">
|
||||||
|
<img src="https://raw.githubusercontent.com/laradock/laradock/master/.github/home-page-images/sponsor-1.png?raw=true" width="300px" alt="Writing essays service Edubirdie"/>
|
||||||
Your logo will show up on the [github repository](https://github.com/laradock/laradock/) index page and the [documentation](http://laradock.io/) main page, with a link to your website. [[Become a sponsor](https://opencollective.com/laradock#sponsor)]
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<!-- OpenCollective Sponsors -->
|
||||||
<a href="https://opencollective.com/laradock/sponsor/0/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/0/avatar.svg"></a>
|
<a href="https://opencollective.com/laradock/sponsor/0/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/0/avatar.svg"></a>
|
||||||
<a href="https://opencollective.com/laradock/sponsor/1/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/1/avatar.svg"></a>
|
<a href="https://opencollective.com/laradock/sponsor/1/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/1/avatar.svg"></a>
|
||||||
<a href="https://opencollective.com/laradock/sponsor/2/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/2/avatar.svg"></a>
|
<a href="https://opencollective.com/laradock/sponsor/2/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/2/avatar.svg"></a>
|
||||||
@ -43,13 +46,14 @@ Your logo will show up on the [github repository](https://github.com/laradock/la
|
|||||||
<a href="https://opencollective.com/laradock/sponsor/5/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/5/avatar.svg"></a>
|
<a href="https://opencollective.com/laradock/sponsor/5/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/5/avatar.svg"></a>
|
||||||
<a href="https://opencollective.com/laradock/sponsor/6/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/6/avatar.svg"></a>
|
<a href="https://opencollective.com/laradock/sponsor/6/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/6/avatar.svg"></a>
|
||||||
<a href="https://opencollective.com/laradock/sponsor/7/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/7/avatar.svg"></a>
|
<a href="https://opencollective.com/laradock/sponsor/7/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/7/avatar.svg"></a>
|
||||||
<a href="https://opencollective.com/laradock/sponsor/8/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/8/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/laradock/sponsor/9/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/9/avatar.svg"></a>
|
|
||||||
|
|
||||||
|
For basic sponsorships go to [Open Collective](https://opencollective.com/laradock#sponsor), for golden sponsorships contact <a href = "mailto: support@laradock.io">support@laradock.io</a>.
|
||||||
|
|
||||||
## Contributors
|
*Your logo will show up on the [github repository](https://github.com/laradock/laradock/) index page and the [documentation](http://laradock.io/) main page.*
|
||||||
|
|
||||||
#### Core contributors:
|
## People
|
||||||
|
|
||||||
|
#### Maintainers:
|
||||||
- [Mahmoud Zalt](https://github.com/Mahmoudz) @mahmoudz | [Twitter](https://twitter.com/Mahmoud_Zalt) | [Site](http://zalt.me)
|
- [Mahmoud Zalt](https://github.com/Mahmoudz) @mahmoudz | [Twitter](https://twitter.com/Mahmoud_Zalt) | [Site](http://zalt.me)
|
||||||
- [Bo-Yi Wu](https://github.com/appleboy) @appleboy | [Twitter](https://twitter.com/appleboy)
|
- [Bo-Yi Wu](https://github.com/appleboy) @appleboy | [Twitter](https://twitter.com/appleboy)
|
||||||
- [Philippe Trépanier](https://github.com/philtrep) @philtrep
|
- [Philippe Trépanier](https://github.com/philtrep) @philtrep
|
||||||
@ -62,9 +66,11 @@ Your logo will show up on the [github repository](https://github.com/laradock/la
|
|||||||
- [Milan Urukalo](https://github.com/urukalo) @urukalo
|
- [Milan Urukalo](https://github.com/urukalo) @urukalo
|
||||||
- [Vince Chu](https://github.com/vwchu) @vwchu
|
- [Vince Chu](https://github.com/vwchu) @vwchu
|
||||||
- [Huadong Zuo](https://github.com/zuohuadong) @zuohuadong
|
- [Huadong Zuo](https://github.com/zuohuadong) @zuohuadong
|
||||||
- Join us, by submitting 20 useful PR's.
|
- [Lan Phan](https://github.com/lanphan) @lanphan
|
||||||
|
- [Ahkui](https://github.com/ahkui) @ahkui
|
||||||
|
- Join us.
|
||||||
|
|
||||||
#### Awesome contributors:
|
#### Awesome Contributors:
|
||||||
|
|
||||||
<a href="https://github.com/laradock/laradock/graphs/contributors"><img src="https://opencollective.com/laradock/contributors.svg?width=890" /></a>
|
<a href="https://github.com/laradock/laradock/graphs/contributors"><img src="https://opencollective.com/laradock/contributors.svg?width=890" /></a>
|
||||||
|
|
||||||
@ -74,18 +80,18 @@ Your logo will show up on the [github repository](https://github.com/laradock/la
|
|||||||
> Help keeping the project development going, by [contributing](http://laradock.io/contributing) or donating a little.
|
> Help keeping the project development going, by [contributing](http://laradock.io/contributing) or donating a little.
|
||||||
> Thanks in advance.
|
> Thanks in advance.
|
||||||
|
|
||||||
Donate directly via [Paypal](https://www.paypal.me/mzalt)
|
Donate directly via [Paypal](https://paypal.me/mzmmzz)
|
||||||
|
|
||||||
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/mzalt)
|
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/mzmmzz)
|
||||||
|
|
||||||
or become a backer on [Open Collective](https://opencollective.com/laradock#backer)
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/laradock#backers" target="_blank"><img src="https://opencollective.com/laradock/backers.svg?width=890"></a>
|
|
||||||
|
|
||||||
or show your support via [Beerpay](https://beerpay.io/laradock/laradock)
|
or show your support via [Beerpay](https://beerpay.io/laradock/laradock)
|
||||||
|
|
||||||
[![Beerpay](https://beerpay.io/laradock/laradock/badge.svg?style=flat)](https://beerpay.io/laradock/laradock)
|
[![Beerpay](https://beerpay.io/laradock/laradock/badge.svg?style=flat)](https://beerpay.io/laradock/laradock)
|
||||||
|
|
||||||
|
or become a backer on [Open Collective](https://opencollective.com/laradock#backer)
|
||||||
|
|
||||||
|
<a href="https://opencollective.com/laradock#backers" target="_blank"><img src="https://opencollective.com/laradock/backers.svg?width=890"></a>
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
BIN
.github/home-page-images/documentation-button.png
vendored
Normal file
BIN
.github/home-page-images/documentation-button.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
BIN
.github/home-page-images/sponsor-1.png
vendored
Normal file
BIN
.github/home-page-images/sponsor-1.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 70 KiB |
@ -29,7 +29,7 @@ env:
|
|||||||
|
|
||||||
- PHP_VERSION=NA BUILD_SERVICE=solr
|
- PHP_VERSION=NA BUILD_SERVICE=solr
|
||||||
- PHP_VERSION=NA BUILD_SERVICE="mssql rethinkdb aerospike"
|
- PHP_VERSION=NA BUILD_SERVICE="mssql rethinkdb aerospike"
|
||||||
- PHP_VERSION=NA BUILD_SERVICE="blackfire minio percona nginx caddy apache2 mysql mariadb postgres postgres-postgis neo4j mongo redis"
|
- PHP_VERSION=NA BUILD_SERVICE="blackfire minio percona nginx caddy apache2 mysql mariadb postgres postgres-postgis neo4j mongo redis cassandra"
|
||||||
- PHP_VERSION=NA BUILD_SERVICE="adminer phpmyadmin pgadmin"
|
- PHP_VERSION=NA BUILD_SERVICE="adminer phpmyadmin pgadmin"
|
||||||
- PHP_VERSION=NA BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 haproxy"
|
- PHP_VERSION=NA BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 haproxy"
|
||||||
- PHP_VERSION=NA BUILD_SERVICE="kibana grafana laravel-echo-server"
|
- PHP_VERSION=NA BUILD_SERVICE="kibana grafana laravel-echo-server"
|
||||||
|
@ -26,7 +26,7 @@ googleAnalytics = "UA-37514928-9"
|
|||||||
permalink = "#"
|
permalink = "#"
|
||||||
|
|
||||||
# Custom assets
|
# Custom assets
|
||||||
custom_css = []
|
custom_css = ["custom-style.css"]
|
||||||
custom_js = []
|
custom_js = []
|
||||||
|
|
||||||
# Syntax highlighting theme
|
# Syntax highlighting theme
|
||||||
@ -48,42 +48,42 @@ googleAnalytics = "UA-37514928-9"
|
|||||||
# ------- MENU START -----------------------------------------
|
# ------- MENU START -----------------------------------------
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Introduction"
|
name = "1. Introduction"
|
||||||
url = "introduction/"
|
url = "introduction/"
|
||||||
weight = 1
|
weight = 1
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Getting Started"
|
name = "2. Getting Started"
|
||||||
url = "getting-started/"
|
url = "getting-started/"
|
||||||
weight = 2
|
weight = 2
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Documentation"
|
name = "3. Documentation"
|
||||||
url = "documentation/"
|
url = "documentation/"
|
||||||
weight = 3
|
weight = 3
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Guides"
|
name = "4. Guides"
|
||||||
url = "guides/"
|
url = "guides/"
|
||||||
weight = 4
|
weight = 4
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Help & Questions"
|
name = "5. Help & Questions"
|
||||||
url = "help/"
|
url = "help/"
|
||||||
weight = 5
|
weight = 5
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Related Projects"
|
name = "6. Related Projects"
|
||||||
url = "related-projects/"
|
url = "related-projects/"
|
||||||
weight = 6
|
weight = 6
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "Contributing"
|
name = "7. Contributing"
|
||||||
url = "contributing/"
|
url = "contributing/"
|
||||||
weight = 7
|
weight = 7
|
||||||
|
|
||||||
[[menu.main]]
|
[[menu.main]]
|
||||||
name = "License"
|
name = "8. License"
|
||||||
url = "license/"
|
url = "license/"
|
||||||
weight = 8
|
weight = 8
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Contributing
|
title: 7. Contributing
|
||||||
type: index
|
type: index
|
||||||
weight: 7
|
weight: 7
|
||||||
---
|
---
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Documentation
|
title: 3. Documentation
|
||||||
type: index
|
type: index
|
||||||
weight: 3
|
weight: 3
|
||||||
---
|
---
|
||||||
@ -250,7 +250,6 @@ docker-compose build php-fpm
|
|||||||
<br>
|
<br>
|
||||||
<a name="Change-the-PHP-CLI-Version"></a>
|
<a name="Change-the-PHP-CLI-Version"></a>
|
||||||
## Change the PHP-CLI Version
|
## Change the PHP-CLI Version
|
||||||
By default **PHP-CLI 7.0** is running.
|
|
||||||
|
|
||||||
>Note: it's not very essential to edit the PHP-CLI version. The PHP-CLI is only used for the Artisan Commands & Composer. It doesn't serve your Application code, this is the PHP-FPM job.
|
>Note: it's not very essential to edit the PHP-CLI version. The PHP-CLI is only used for the Artisan Commands & Composer. It doesn't serve your Application code, this is the PHP-FPM job.
|
||||||
|
|
||||||
@ -297,6 +296,24 @@ e) set it to `true`
|
|||||||
|
|
||||||
For information on how to configure xDebug with your IDE and work it out, check this [Repository](https://github.com/LarryEitel/laravel-laradock-phpstorm) or follow up on the next section if you use linux and PhpStorm.
|
For information on how to configure xDebug with your IDE and work it out, check this [Repository](https://github.com/LarryEitel/laravel-laradock-phpstorm) or follow up on the next section if you use linux and PhpStorm.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Control-xDebug"></a>
|
||||||
|
## Start/Stop xDebug:
|
||||||
|
|
||||||
|
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):
|
||||||
|
|
||||||
|
- Stop xDebug from running by default: `.php-fpm/xdebug stop`.
|
||||||
|
- Start xDebug by default: `.php-fpm/xdebug start`.
|
||||||
|
- See the status: `.php-fpm/xdebug status`.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Install-phpdbg"></a>
|
<a name="Install-phpdbg"></a>
|
||||||
## Install phpdbg
|
## Install phpdbg
|
||||||
@ -320,37 +337,6 @@ PHP_FPM_INSTALL_PHPDBG=true
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
<a name="Setup remote debugging for PhpStorm on Linux"></a>
|
|
||||||
## Setup remote debugging for PhpStorm on Linux
|
|
||||||
|
|
||||||
- Make sure you have followed the steps above in the [Install Xdebug section](#install-xdebug).
|
|
||||||
|
|
||||||
- Make sure Xdebug accepts connections and listens on port 9000. (Should be default configuration).
|
|
||||||
|
|
||||||
![Debug Configuration](/images/photos/PHPStorm/linux/configuration/debugConfiguration.png "Debug Configuration").
|
|
||||||
|
|
||||||
- Create a server with name `laradock` (matches **PHP_IDE_CONFIG** key in environment file) and make sure to map project root path with server correctly.
|
|
||||||
|
|
||||||
![Server Configuration](/images/photos/PHPStorm/linux/configuration/serverConfiguration.png "Server Configuration").
|
|
||||||
|
|
||||||
- Start listening for debug connections, place a breakpoint and you are good to go !
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
|
||||||
<a name="Control-xDebug"></a>
|
|
||||||
## Start/Stop xDebug:
|
|
||||||
|
|
||||||
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):
|
|
||||||
|
|
||||||
- Stop xDebug from running by default: `.php-fpm/xdebug stop`.
|
|
||||||
- Start xDebug by default: `.php-fpm/xdebug start`.
|
|
||||||
- See the status: `.php-fpm/xdebug status`.
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
@ -398,29 +384,29 @@ Always download the latest version of [Loaders for ionCube ](http://www.ioncube.
|
|||||||
<a name="Install-SonarQube"></a>
|
<a name="Install-SonarQube"></a>
|
||||||
|
|
||||||
## Install SonarQube (automatic code review tool)
|
## Install SonarQube (automatic code review tool)
|
||||||
SonarQube® is an automatic code review tool to detect bugs, vulnerabilities and code smells in your code. It can integrate with your existing workflow to enable continuous code inspection across your project branches and pull requests.
|
SonarQube® is an automatic code review tool to detect bugs, vulnerabilities and code smells in your code. It can integrate with your existing workflow to enable continuous code inspection across your project branches and pull requests.
|
||||||
<br>
|
<br>
|
||||||
1 - Open the `.env` file
|
1 - Open the `.env` file
|
||||||
<br>
|
<br>
|
||||||
2 - Search for the `SONARQUBE_HOSTNAME=sonar.example.com` argument
|
2 - Search for the `SONARQUBE_HOSTNAME=sonar.example.com` argument
|
||||||
<br>
|
<br>
|
||||||
3 - Set it to your-domain `sonar.example.com`
|
3 - Set it to your-domain `sonar.example.com`
|
||||||
<br>
|
<br>
|
||||||
4 - `docker-compose up -d sonarqube`
|
4 - `docker-compose up -d sonarqube`
|
||||||
<br>
|
<br>
|
||||||
5 - Open your browser: http://localhost:9000/
|
5 - Open your browser: http://localhost:9000/
|
||||||
|
|
||||||
Troubleshooting:
|
Troubleshooting:
|
||||||
|
|
||||||
if you encounter a database error:
|
if you encounter a database error:
|
||||||
```
|
```
|
||||||
docker-compose exec --user=root postgres
|
docker-compose exec --user=root postgres
|
||||||
source docker-entrypoint-initdb.d/init_sonarqube_db.sh
|
source docker-entrypoint-initdb.d/init_sonarqube_db.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
If you encounter logs error:
|
If you encounter logs error:
|
||||||
```
|
```
|
||||||
docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
|
docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
|
||||||
```
|
```
|
||||||
[**SonarQube Documentation Here**](https://docs.sonarqube.org/latest/)
|
[**SonarQube Documentation Here**](https://docs.sonarqube.org/latest/)
|
||||||
|
|
||||||
@ -1267,6 +1253,36 @@ docker-compose up -d grafana
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Use-Graylog"></a>
|
||||||
|
## Use Graylog
|
||||||
|
|
||||||
|
1 - Boot the container `docker-compose up -d graylog`
|
||||||
|
|
||||||
|
2 - Open your Laravel's `.env` file and set the `GRAYLOG_PASSWORD` to some passsword, and `GRAYLOG_SHA256_PASSWORD` to the sha256 representation of your password (`GRAYLOG_SHA256_PASSWORD` is what matters, `GRAYLOG_PASSWORD` is just a reminder of your password).
|
||||||
|
|
||||||
|
> Your password must be at least 16 characters long
|
||||||
|
> You can generate sha256 of some password with the following command `echo -n somesupersecretpassword | sha256sum`
|
||||||
|
|
||||||
|
```env
|
||||||
|
GRAYLOG_PASSWORD=somesupersecretpassword
|
||||||
|
GRAYLOG_SHA256_PASSWORD=b1cb6e31e172577918c9e7806c572b5ed8477d3f57aa737bee4b5b1db3696f09
|
||||||
|
```
|
||||||
|
|
||||||
|
3 - Go to `http://localhost:9000/` (if your port is not changed)
|
||||||
|
|
||||||
|
4 - Authenticate from the app.
|
||||||
|
|
||||||
|
> Username: admin
|
||||||
|
> Password: somesupersecretpassword (if you haven't changed the password)
|
||||||
|
|
||||||
|
5 - Go to the system->inputs and launch new input
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Use-Traefik"></a>
|
<a name="Use-Traefik"></a>
|
||||||
## Use Traefik
|
## Use Traefik
|
||||||
@ -1551,22 +1567,6 @@ Available versions are: 5.5, 5.6, 5.7, 8.0, or latest. See https://store.docker
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
|
||||||
<a name="MySQL-access-from-host"></a>
|
|
||||||
## MySQL access from host
|
|
||||||
|
|
||||||
You can forward the MySQL/MariaDB port to your host by making sure these lines are added to the `mysql` or `mariadb` section of the `docker-compose.yml` or in your [environment specific Compose](https://docs.docker.com/compose/extends/) file.
|
|
||||||
|
|
||||||
```
|
|
||||||
ports:
|
|
||||||
- "3306:3306"
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="MySQL-root-access"></a>
|
<a name="MySQL-root-access"></a>
|
||||||
## MySQL root access
|
## MySQL root access
|
||||||
@ -1667,7 +1667,7 @@ Enabling Global Composer Install during the build for the container allows you t
|
|||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Magento-2-authentication-credentials"></a>
|
<a name="Magento-2-authentication-credentials"></a>
|
||||||
## Magento 2 authentication credential (composer install)
|
## Add authentication credential for Magento 2
|
||||||
|
|
||||||
1 - Open the `.env` file
|
1 - Open the `.env` file
|
||||||
|
|
||||||
@ -1999,22 +1999,6 @@ Remote debug Laravel web and phpunit tests.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
|
||||||
<a name="upgrading-laradock"></a>
|
|
||||||
## Upgrading Laradock
|
|
||||||
|
|
||||||
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`.
|
|
||||||
|
|
||||||
**Note:** If you face any problem with the last step above: rebuild all your containers
|
|
||||||
`docker-compose build --no-cache`
|
|
||||||
"Warning Containers Data might be lost!"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -2182,126 +2166,17 @@ docker-compose up ...
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Common-Problems"></a>
|
<a name="upgrade-laradock"></a>
|
||||||
## Common Problems
|
## Upgrade Laradock
|
||||||
|
|
||||||
*Here's a list of the common problems you might face, and the possible solutions.*
|
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`.
|
||||||
|
|
||||||
|
**Note:** If you face any problem with the last step above: rebuild all your containers
|
||||||
|
`docker-compose build --no-cache`
|
||||||
|
"Warning Containers Data might be lost!"
|
||||||
|
|
||||||
<br>
|
|
||||||
## I see a blank (white) page instead of the Laravel 'Welcome' page!
|
|
||||||
|
|
||||||
Run the following command from the Laravel root directory:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
sudo chmod -R 777 storage bootstrap/cache
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
|
||||||
## I see "Welcome to nginx" instead of the Laravel App!
|
|
||||||
|
|
||||||
Use `http://127.0.0.1` instead of `http://localhost` in your browser.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
|
||||||
## I see an error message containing `address already in use` or `port is already allocated`
|
|
||||||
|
|
||||||
Make sure the ports for the services that you are trying to run (22, 80, 443, 3306, etc.) are not being used already by other programs on the host, such as a built in `apache`/`httpd` service or other development tools you have installed.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
|
||||||
## I get NGINX error 404 Not Found on Windows.
|
|
||||||
|
|
||||||
1. Go to docker Settings on your Windows machine.
|
|
||||||
2. Click on the `Shared Drives` tab and check the drive that contains your project files.
|
|
||||||
3. Enter your windows username and password.
|
|
||||||
4. Go to the `reset` tab and click restart docker.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
|
||||||
## The time in my services does not match the current time
|
|
||||||
|
|
||||||
1. Make sure you've [changed the timezone](#Change-the-timezone).
|
|
||||||
2. Stop and rebuild the containers (`docker-compose up -d --build <services>`)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
|
||||||
## I get MySQL connection refused
|
|
||||||
|
|
||||||
This error sometimes happens because your Laravel application isn't running on the container localhost IP (Which is 127.0.0.1). Steps to fix it:
|
|
||||||
|
|
||||||
* Option A
|
|
||||||
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`
|
|
||||||
|
|
||||||
## I get stuck when building nginx on `fetch http://mirrors.aliyun.com/alpine/v3.5/main/x86_64/APKINDEX.tar.gz`
|
|
||||||
|
|
||||||
As stated on [#749](https://github.com/laradock/laradock/issues/749#issuecomment-419652646), Already fixed,just set `CHANGE_SOURCE` to false.
|
|
||||||
|
|
||||||
## Custom composer repo packagist url and npm registry url
|
|
||||||
|
|
||||||
In China, the origin source of composer and npm is very slow. You can add `WORKSPACE_NPM_REGISTRY` and `WORKSPACE_COMPOSER_REPO_PACKAGIST` config in `.env` to use your custom source.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
```bash
|
|
||||||
WORKSPACE_NPM_REGISTRY=https://registry.npm.taobao.org
|
|
||||||
WORKSPACE_COMPOSER_REPO_PACKAGIST=https://packagist.phpcomposer.com
|
|
||||||
```
|
|
||||||
|
|
||||||
<br>
|
|
||||||
|
|
||||||
## I get `Module build failed: Error: write EPIPE` while compiling react application
|
|
||||||
|
|
||||||
When you run `npm build` or `yarn dev` building a react application using webpack with elixir you may receive a `Error: write EPIPE` while processing .jpg images.
|
|
||||||
|
|
||||||
This is caused of an outdated library for processing **.jpg files** in ubuntu 16.04.
|
|
||||||
|
|
||||||
To fix the problem you can follow those steps
|
|
||||||
|
|
||||||
1 - Open the `.env`.
|
|
||||||
|
|
||||||
2 - Search for `WORKSPACE_INSTALL_LIBPNG` or add the key if missing.
|
|
||||||
|
|
||||||
3 - Set the value to true:
|
|
||||||
|
|
||||||
```dotenv
|
|
||||||
WORKSPACE_INSTALL_LIBPNG=true
|
|
||||||
```
|
|
||||||
|
|
||||||
4 - Finally rebuild the workspace image
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker-compose build workspace
|
|
||||||
```
|
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
---
|
---
|
||||||
title: Getting Started
|
title: 2. Getting Started
|
||||||
type: index
|
type: index
|
||||||
weight: 2
|
weight: 2
|
||||||
---
|
---
|
||||||
|
|
||||||
## Requirements
|
## 2.1 Requirements
|
||||||
|
|
||||||
- [Git](https://git-scm.com/downloads)
|
- [Git](https://git-scm.com/downloads)
|
||||||
- [Docker](https://www.docker.com/products/docker/) `>= 17.12`
|
- [Docker](https://www.docker.com/products/docker/) `>= 17.12`
|
||||||
@ -12,10 +12,7 @@ weight: 2
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 2.2 Installation
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
Choose the setup the best suits your needs.
|
Choose the setup the best suits your needs.
|
||||||
|
|
||||||
@ -44,7 +41,7 @@ Note: If you are not using Git yet for your project, you can use `git clone` ins
|
|||||||
*To keep track of your Laradock changes, between your projects and also keep Laradock updated [check these docs](/documentation/#keep-track-of-your-laradock-changes)*
|
*To keep track of your Laradock changes, between your projects and also keep Laradock updated [check these docs](/documentation/#keep-track-of-your-laradock-changes)*
|
||||||
|
|
||||||
|
|
||||||
Your folder structure should look like this:
|
2 - Make sure your folder structure should look like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
+ project-a
|
+ project-a
|
||||||
@ -55,7 +52,7 @@ Your folder structure should look like this:
|
|||||||
|
|
||||||
*(It's important to rename the laradock folders to unique name in each project, if you want to run laradock per project).*
|
*(It's important to rename the laradock folders to unique name in each project, if you want to run laradock per project).*
|
||||||
|
|
||||||
> **Now jump to the [Usage](#Usage) section.**
|
3 - Go to the [Usage](#Usage) section.
|
||||||
|
|
||||||
<a name="A2"></a>
|
<a name="A2"></a>
|
||||||
### A.2) Don't have a PHP project yet:
|
### A.2) Don't have a PHP project yet:
|
||||||
@ -89,7 +86,7 @@ APP_CODE_PATH_HOST=../project-z/
|
|||||||
|
|
||||||
Make sure to replace `project-z` with your project folder name.
|
Make sure to replace `project-z` with your project folder name.
|
||||||
|
|
||||||
> **Now jump to the [Usage](#Usage) section.**
|
3 - Go to the [Usage](#Usage) section.
|
||||||
|
|
||||||
|
|
||||||
<a name="B"></a>
|
<a name="B"></a>
|
||||||
@ -110,9 +107,11 @@ Your folder structure should look like this:
|
|||||||
+ project-2
|
+ project-2
|
||||||
```
|
```
|
||||||
|
|
||||||
2 - Go to `nginx/sites` and create config files to point to different project directory when visiting different domains.
|
2 - Go to your web server and create config files to point to different project directory when visiting different domains:
|
||||||
|
|
||||||
Laradock by default includes `app.conf.example`, `laravel.conf.example` and `symfony.conf.example` as working samples.
|
For **Nginx** go to `nginx/sites`, for **Apache2** `apache2/sites`.
|
||||||
|
|
||||||
|
Laradock by default includes some sample files for you to copy `app.conf.example`, `laravel.conf.example` and `symfony.conf.example`.
|
||||||
|
|
||||||
3 - change the default names `*.conf`:
|
3 - change the default names `*.conf`:
|
||||||
|
|
||||||
@ -125,9 +124,10 @@ You can rename the config files, project folders and domains as you like, just m
|
|||||||
127.0.0.1 project-2.test
|
127.0.0.1 project-2.test
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
If you use Chrome 63 or above for development, don't use `.dev`. [Why?](https://laravel-news.com/chrome-63-now-forces-dev-domains-https). Instead use `.localhost`, `.invalid`, `.test`, or `.example`.
|
If you use Chrome 63 or above for development, don't use `.dev`. [Why?](https://laravel-news.com/chrome-63-now-forces-dev-domains-https). Instead use `.localhost`, `.invalid`, `.test`, or `.example`.
|
||||||
|
|
||||||
> **Now jump to the [Usage](#Usage) section.**
|
4 - Go to the [Usage](#Usage) section.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ If you use Chrome 63 or above for development, don't use `.dev`. [Why?](https://
|
|||||||
|
|
||||||
|
|
||||||
<a name="Usage"></a>
|
<a name="Usage"></a>
|
||||||
## Usage
|
## 2.3 Usage
|
||||||
|
|
||||||
**Read Before starting:**
|
**Read Before starting:**
|
||||||
|
|
||||||
@ -213,7 +213,16 @@ Open your PHP project's `.env` file or whichever configuration file you are read
|
|||||||
DB_HOST=mysql
|
DB_HOST=mysql
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You need to use the Laradock's default DB credentials which can be found in the `.env` file (ex: `MYSQL_USER=`).
|
||||||
|
Or you can change them and rebuild the container.
|
||||||
|
|
||||||
*If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
|
*If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
5 - Open your browser and visit your localhost address `http://localhost/`. If you followed the multiple projects setup, you can visit `http://project-1.test/` and `http://project-2.test/`.
|
5 - Open your browser and visit your localhost address.
|
||||||
|
|
||||||
|
If you followed the multiple projects setup, you can visit `http://project-1.test/` and `http://project-2.test/`.
|
||||||
|
|
||||||
|
[http://localhost:8080](http://localhost:8080)
|
||||||
|
|
||||||
|
Make sure you add use the right port number as provided by your running server. Ex: NGINX uses port 8080 by default while Apache2 uses 80.
|
||||||
|
@ -1,21 +1,14 @@
|
|||||||
---
|
---
|
||||||
title: Guides
|
title: 4. Guides
|
||||||
type: index
|
type: index
|
||||||
weight: 4
|
weight: 4
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* [Production Setup on Digital Ocean](#Digital-Ocean)
|
|
||||||
* [PHPStorm XDebug Setup](#PHPStorm-Debugging)
|
|
||||||
* [Running Laravel Dusk Test](#Laravel-Dusk)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="Digital-Ocean"></a>
|
<a name="Digital-Ocean"></a>
|
||||||
# Production Setup on Digital Ocean
|
## Production Setup on Digital Ocean
|
||||||
|
|
||||||
## Install Docker
|
### Install Docker
|
||||||
|
|
||||||
- Visit [DigitalOcean](https://cloud.digitalocean.com/login) and login.
|
- Visit [DigitalOcean](https://cloud.digitalocean.com/login) and login.
|
||||||
- Click the `Create Droplet` button.
|
- Click the `Create Droplet` button.
|
||||||
@ -24,7 +17,7 @@ weight: 4
|
|||||||
- Continue creating the droplet as you normally would.
|
- Continue creating the droplet as you normally would.
|
||||||
- If needed, check your e-mail for the droplet root password.
|
- If needed, check your e-mail for the droplet root password.
|
||||||
|
|
||||||
## SSH to your Server
|
### SSH to your Server
|
||||||
|
|
||||||
Find the IP address of the droplet in the DigitalOcean interface. Use it to connect to the server.
|
Find the IP address of the droplet in the DigitalOcean interface. Use it to connect to the server.
|
||||||
|
|
||||||
@ -40,7 +33,7 @@ You can now check if Docker is available:
|
|||||||
$root@server:~# docker
|
$root@server:~# docker
|
||||||
```
|
```
|
||||||
|
|
||||||
## Set Up Your Laravel Project
|
### Set Up Your Laravel Project
|
||||||
|
|
||||||
```
|
```
|
||||||
$root@server:~# apt-get install git
|
$root@server:~# apt-get install git
|
||||||
@ -50,12 +43,12 @@ $root@server:~/laravel/ git submodule add https://github.com/Laradock/laradock.g
|
|||||||
$root@server:~/laravel/ cd laradock
|
$root@server:~/laravel/ cd laradock
|
||||||
```
|
```
|
||||||
|
|
||||||
## Enter the laradock folder and rename env-example to .env.
|
### Enter the laradock folder and rename env-example to .env.
|
||||||
```
|
```
|
||||||
$root@server:~/laravel/laradock# cp env-example .env
|
$root@server:~/laravel/laradock# cp env-example .env
|
||||||
```
|
```
|
||||||
|
|
||||||
## 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
|
||||||
@ -63,13 +56,13 @@ $root@server:~/laravel/laradock# docker-compose up -d nginx mysql
|
|||||||
|
|
||||||
Note that more containers are available, find them in the [docs](http://laradock.io/introduction/#supported-software-containers) or the `docker-compose.yml` file.
|
Note that more containers are available, find them in the [docs](http://laradock.io/introduction/#supported-software-containers) or the `docker-compose.yml` file.
|
||||||
|
|
||||||
## Go to Your Workspace
|
### Go to Your Workspace
|
||||||
|
|
||||||
```
|
```
|
||||||
docker-compose exec workspace bash
|
docker-compose exec workspace bash
|
||||||
```
|
```
|
||||||
|
|
||||||
## Execute commands
|
### Execute commands
|
||||||
|
|
||||||
If you want to only execute some command and don't want to enter bash, you can execute `docker-compose run workspace <command>`.
|
If you want to only execute some command and don't want to enter bash, you can execute `docker-compose run workspace <command>`.
|
||||||
|
|
||||||
@ -77,7 +70,7 @@ If you want to only execute some command and don't want to enter bash, you can e
|
|||||||
docker-compose run workspace php artisan migrate
|
docker-compose run workspace php artisan migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
## Install and configure Laravel
|
### Install and configure Laravel
|
||||||
|
|
||||||
Let's install Laravel's dependencies, add the `.env` file, generate the key and give proper permissions to the cache folder.
|
Let's install Laravel's dependencies, add the `.env` file, generate the key and give proper permissions to the cache folder.
|
||||||
|
|
||||||
@ -100,7 +93,7 @@ It should show you the Laravel default welcome page.
|
|||||||
|
|
||||||
However, we want it to show up using your custom domain name, as well.
|
However, we want it to show up using your custom domain name, as well.
|
||||||
|
|
||||||
## Using Your Own Domain Name
|
### Using Your Own Domain Name
|
||||||
|
|
||||||
Login to your DNS provider, such as Godaddy, Namecheap.
|
Login to your DNS provider, such as Godaddy, Namecheap.
|
||||||
|
|
||||||
@ -118,7 +111,7 @@ Visit: https://cloud.digitalocean.com/networking/domains
|
|||||||
|
|
||||||
Add your domain name and choose the server IP you'd provision earlier.
|
Add your domain name and choose the server IP you'd provision earlier.
|
||||||
|
|
||||||
## Serving Site With NGINX (HTTP ONLY)
|
### Serving Site With NGINX (HTTP ONLY)
|
||||||
|
|
||||||
Go back to command line.
|
Go back to command line.
|
||||||
|
|
||||||
@ -142,14 +135,14 @@ And add `server_name` (your custom domain)
|
|||||||
server_name yourdomain.com;
|
server_name yourdomain.com;
|
||||||
```
|
```
|
||||||
|
|
||||||
## Rebuild Your Nginx
|
### Rebuild Your Nginx
|
||||||
|
|
||||||
```
|
```
|
||||||
$root@server:~/laravel/laradock# docker-compose down
|
$root@server:~/laravel/laradock# docker-compose down
|
||||||
$root@server:~/laravel/laradock# docker-compose build nginx
|
$root@server:~/laravel/laradock# docker-compose build nginx
|
||||||
```
|
```
|
||||||
|
|
||||||
## Re Run Your Containers MYSQL and NGINX
|
### Re Run Your Containers MYSQL and NGINX
|
||||||
|
|
||||||
```
|
```
|
||||||
$root@server:~/laravel/laradock/nginx# docker-compose up -d nginx mysql
|
$root@server:~/laravel/laradock/nginx# docker-compose up -d nginx mysql
|
||||||
@ -157,7 +150,7 @@ $root@server:~/laravel/laradock/nginx# docker-compose up -d nginx mysql
|
|||||||
|
|
||||||
**View Your Site with HTTP ONLY (http://yourdomain.com)**
|
**View Your Site with HTTP ONLY (http://yourdomain.com)**
|
||||||
|
|
||||||
## Run Site on SSL with Let's Encrypt Certificate
|
### Run Site on SSL with Let's Encrypt Certificate
|
||||||
|
|
||||||
**Note: You need to Use Caddy here Instead of Nginx**
|
**Note: You need to Use Caddy here Instead of Nginx**
|
||||||
|
|
||||||
@ -196,7 +189,7 @@ tls serverbreaker@gmai.com
|
|||||||
|
|
||||||
This is needed Prior to Creating Let's Encypt
|
This is needed Prior to Creating Let's Encypt
|
||||||
|
|
||||||
## Run Your Caddy Container without the -d flag and Generate SSL with Let's Encrypt
|
### Run Your Caddy Container without the -d flag and Generate SSL with Let's Encrypt
|
||||||
|
|
||||||
```
|
```
|
||||||
$root@server:~/laravel/laradock# docker-compose up caddy
|
$root@server:~/laravel/laradock# docker-compose up caddy
|
||||||
@ -217,7 +210,7 @@ caddy_1 | http://yourdomain.com
|
|||||||
|
|
||||||
After it finishes, press `Ctrl` + `C` to exit.
|
After it finishes, press `Ctrl` + `C` to exit.
|
||||||
|
|
||||||
## Stop All Containers and ReRun Caddy and Other Containers on Background
|
### Stop All Containers and ReRun Caddy and Other Containers on Background
|
||||||
|
|
||||||
```
|
```
|
||||||
$root@server:~/laravel/laradock# docker-compose down
|
$root@server:~/laravel/laradock# docker-compose down
|
||||||
@ -238,326 +231,6 @@ View your Site in the Browser Securely Using HTTPS (https://yourdomain.com)
|
|||||||
- [https://caddyserver.com/docs/tls](https://caddyserver.com/docs/tls)
|
- [https://caddyserver.com/docs/tls](https://caddyserver.com/docs/tls)
|
||||||
- [https://caddyserver.com/docs/caddyfile](https://caddyserver.com/docs/caddyfile)
|
- [https://caddyserver.com/docs/caddyfile](https://caddyserver.com/docs/caddyfile)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
<br>
|
|
||||||
|
|
||||||
<a name="PHPStorm-Debugging"></a>
|
|
||||||
# PHPStorm XDebug Setup
|
|
||||||
|
|
||||||
- [Intro](#Intro)
|
|
||||||
- [Installation](#Installation)
|
|
||||||
- [Customize laradock/docker-compose.yml](#CustomizeDockerCompose)
|
|
||||||
- [Clean House](#InstallCleanHouse)
|
|
||||||
- [Laradock Dial Tone](#InstallLaradockDialTone)
|
|
||||||
- [hosts](#AddToHosts)
|
|
||||||
- [Firewall](#FireWall)
|
|
||||||
- [Enable xDebug on php-fpm](#enablePhpXdebug)
|
|
||||||
- [PHPStorm Settings](#InstallPHPStorm)
|
|
||||||
- [Configs](#InstallPHPStormConfigs)
|
|
||||||
- [Usage](#Usage)
|
|
||||||
- [Laravel](#UsageLaravel)
|
|
||||||
- [Run ExampleTest](#UsagePHPStormRunExampleTest)
|
|
||||||
- [Debug ExampleTest](#UsagePHPStormDebugExampleTest)
|
|
||||||
- [Debug Web Site](#UsagePHPStormDebugSite)
|
|
||||||
- [SSH into workspace](#SSHintoWorkspace)
|
|
||||||
- [KiTTY](#InstallKiTTY)
|
|
||||||
|
|
||||||
<a name="Intro"></a>
|
|
||||||
## 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`,
|
|
||||||
you should be able to adjust accordingly. This guide was written based on Docker for Windows Native.
|
|
||||||
|
|
||||||
<a name="Installation"></a>
|
|
||||||
## Installation
|
|
||||||
|
|
||||||
- This guide assumes the following:
|
|
||||||
- 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`.
|
|
||||||
|
|
||||||
<a name="AddToHosts"></a>
|
|
||||||
## hosts
|
|
||||||
- Add `laravel` to your hosts file located on Windows 10 at `C:\Windows\System32\drivers\etc\hosts`. It should be set to the IP of your running container. Mine is: `10.0.75.2`
|
|
||||||
On Windows you can find it by opening Windows `Hyper-V Manager`.
|
|
||||||
- ![Windows Hyper-V Manager](images/photos/PHPStorm/Settings/WindowsHyperVManager.png)
|
|
||||||
|
|
||||||
- [Hosts File Editor](https://github.com/scottlerch/HostsFileEditor) makes it easy to change your hosts file.
|
|
||||||
- Set `laravel` to your docker host IP. See [Example](images/photos/SimpleHostsEditor/AddHost_laravel.png).
|
|
||||||
|
|
||||||
|
|
||||||
<a name="FireWall"></a>
|
|
||||||
## Firewall
|
|
||||||
Your PHPStorm will need to be able to receive a connection from PHP xdebug either your running workspace or php-fpm containers on port 9000. This means that your Windows Firewall should either enable connections from the Application PHPStorm OR the port.
|
|
||||||
|
|
||||||
- It is important to note that if the Application PHPStorm is NOT enabled in the firewall, you will not be able to recreate a rule to override that.
|
|
||||||
- Also be aware that if you are installing/upgrade different versions of PHPStorm, you MAY have orphaned references to PHPStorm in your Firewall! You may decide to remove orphaned references however in either case, make sure that they are set to receive public TCP traffic.
|
|
||||||
|
|
||||||
### Edit laradock/docker-compose.yml
|
|
||||||
Set the following variables:
|
|
||||||
```
|
|
||||||
### Workspace Utilities Container ###############
|
|
||||||
|
|
||||||
workspace:
|
|
||||||
build:
|
|
||||||
context: ./workspace
|
|
||||||
args:
|
|
||||||
- INSTALL_XDEBUG=true
|
|
||||||
- INSTALL_WORKSPACE_SSH=true
|
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
### PHP-FPM Container #####################
|
|
||||||
|
|
||||||
php-fpm:
|
|
||||||
build:
|
|
||||||
context: ./php-fpm
|
|
||||||
args:
|
|
||||||
- INSTALL_XDEBUG=true
|
|
||||||
...
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
### Edit xdebug.ini files
|
|
||||||
- `laradock/workspace/xdebug.ini`
|
|
||||||
- `laradock/php-fpm/xdebug.ini`
|
|
||||||
|
|
||||||
Set the following variables:
|
|
||||||
|
|
||||||
```
|
|
||||||
xdebug.remote_autostart=1
|
|
||||||
xdebug.remote_enable=1
|
|
||||||
xdebug.remote_connect_back=1
|
|
||||||
xdebug.cli_color=1
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
<a name="InstallCleanHouse"></a>
|
|
||||||
### Need to clean house first?
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
- 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).
|
|
||||||
|
|
||||||
`docker ps -a | awk '{ print $1,$2 }' | grep laradock_ | awk '{print $1}' | xargs -I {} docker rm {}`
|
|
||||||
|
|
||||||
- Delete all images containing `laradock`.
|
|
||||||
|
|
||||||
`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:** Some may fail with:
|
|
||||||
`Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images`
|
|
||||||
|
|
||||||
- I added this to my `.bashrc` to remove orphaned images.
|
|
||||||
|
|
||||||
```
|
|
||||||
dclean() {
|
|
||||||
processes=`docker ps -q -f status=exited`
|
|
||||||
if [ -n "$processes" ]; then
|
|
||||||
docker rm $processes
|
|
||||||
fi
|
|
||||||
|
|
||||||
images=`docker images -q -f dangling=true`
|
|
||||||
if [ -n "$images" ]; then
|
|
||||||
docker rmi $images
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
- 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_* images
|
|
||||||
dcleanlaradockfunction()
|
|
||||||
{
|
|
||||||
echo 'Removing ALL containers associated with laradock'
|
|
||||||
docker ps -a | awk '{ print $1,$2 }' | grep laradock | awk '{print $1}' | xargs -I {} docker rm {}
|
|
||||||
|
|
||||||
# remove ALL images associated with laradock_
|
|
||||||
# does NOT delete laradock/* which are hub images
|
|
||||||
echo 'Removing ALL images associated with laradock_'
|
|
||||||
docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}
|
|
||||||
|
|
||||||
echo 'Listing all laradock docker hub images...'
|
|
||||||
docker images | grep laradock
|
|
||||||
|
|
||||||
echo 'dcleanlaradock completed'
|
|
||||||
}
|
|
||||||
# associate the above function with an alias
|
|
||||||
# so can recall/lookup by typing 'alias'
|
|
||||||
alias dcleanlaradock=dcleanlaradockfunction
|
|
||||||
```
|
|
||||||
|
|
||||||
<a name="InstallLaradockDialTone"></a>
|
|
||||||
## Let's get a dial-tone with Laravel
|
|
||||||
|
|
||||||
```
|
|
||||||
# barebones at this point
|
|
||||||
docker-compose up -d nginx mysql
|
|
||||||
|
|
||||||
# run
|
|
||||||
docker-compose ps
|
|
||||||
|
|
||||||
# Should see:
|
|
||||||
Name Command State Ports
|
|
||||||
-----------------------------------------------------------------------------------------------------------
|
|
||||||
laradock_mysql_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
|
|
||||||
laradock_nginx_1 nginx Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
|
|
||||||
laradock_php-fpm_1 php-fpm Up 9000/tcp
|
|
||||||
laradock_volumes_data_1 true Exit 0
|
|
||||||
laradock_volumes_source_1 true Exit 0
|
|
||||||
laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222->22/tcp
|
|
||||||
```
|
|
||||||
|
|
||||||
<a name="enablePhpXdebug"></a>
|
|
||||||
## Enable xDebug on php-fpm
|
|
||||||
|
|
||||||
In a host terminal sitting in the laradock folder, run: `./php-fpm/xdebug status`
|
|
||||||
You should see something like the following:
|
|
||||||
|
|
||||||
```
|
|
||||||
xDebug status
|
|
||||||
laradock_php-fpm_1
|
|
||||||
PHP 7.0.9 (cli) (built: Aug 10 2016 19:45:48) ( NTS )
|
|
||||||
Copyright (c) 1997-2016 The PHP Group
|
|
||||||
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
|
|
||||||
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
|
|
||||||
```
|
|
||||||
|
|
||||||
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
|
|
||||||
`php-fpm` is started and listening for debug info on port 9000.
|
|
||||||
|
|
||||||
|
|
||||||
<a name="InstallPHPStormConfigs"></a>
|
|
||||||
## PHPStorm Settings
|
|
||||||
|
|
||||||
- Here are some settings that are known to work:
|
|
||||||
- `Settings/BuildDeploymentConnection`
|
|
||||||
- ![Settings/BuildDeploymentConnection](/images/photos/PHPStorm/Settings/BuildDeploymentConnection.png)
|
|
||||||
|
|
||||||
- `Settings/BuildDeploymentConnectionMappings`
|
|
||||||
- ![Settings/BuildDeploymentConnectionMappings](/images/photos/PHPStorm/Settings/BuildDeploymentConnectionMappings.png)
|
|
||||||
|
|
||||||
- `Settings/BuildDeploymentDebugger`
|
|
||||||
- ![Settings/BuildDeploymentDebugger](/images/photos/PHPStorm/Settings/BuildDeploymentDebugger.png)
|
|
||||||
|
|
||||||
- `Settings/EditRunConfigurationRemoteWebDebug`
|
|
||||||
- ![Settings/EditRunConfigurationRemoteWebDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png)
|
|
||||||
|
|
||||||
- `Settings/EditRunConfigurationRemoteExampleTestDebug`
|
|
||||||
- ![Settings/EditRunConfigurationRemoteExampleTestDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png)
|
|
||||||
|
|
||||||
- `Settings/LangsPHPDebug`
|
|
||||||
- ![Settings/LangsPHPDebug](/images/photos/PHPStorm/Settings/LangsPHPDebug.png)
|
|
||||||
|
|
||||||
- `Settings/LangsPHPInterpreters`
|
|
||||||
- ![Settings/LangsPHPInterpreters](/images/photos/PHPStorm/Settings/LangsPHPInterpreters.png)
|
|
||||||
|
|
||||||
- `Settings/LangsPHPPHPUnit`
|
|
||||||
- ![Settings/LangsPHPPHPUnit](/images/photos/PHPStorm/Settings/LangsPHPPHPUnit.png)
|
|
||||||
|
|
||||||
- `Settings/LangsPHPServers`
|
|
||||||
- ![Settings/LangsPHPServers](/images/photos/PHPStorm/Settings/LangsPHPServers.png)
|
|
||||||
|
|
||||||
- `RemoteHost`
|
|
||||||
To switch on this view, go to: `Menu/Tools/Deployment/Browse Remote Host`.
|
|
||||||
- ![RemoteHost](/images/photos/PHPStorm/RemoteHost.png)
|
|
||||||
|
|
||||||
- `RemoteWebDebug`
|
|
||||||
- ![DebugRemoteOn](/images/photos/PHPStorm/DebugRemoteOn.png)
|
|
||||||
|
|
||||||
- `EditRunConfigurationRemoteWebDebug`
|
|
||||||
Go to: `Menu/Run/Edit Configurations`.
|
|
||||||
- ![EditRunConfigurationRemoteWebDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png)
|
|
||||||
|
|
||||||
- `EditRunConfigurationRemoteExampleTestDebug`
|
|
||||||
Go to: `Menu/Run/Edit Configurations`.
|
|
||||||
- ![EditRunConfigurationRemoteExampleTestDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png)
|
|
||||||
|
|
||||||
- `WindowsFirewallAllowedApps`
|
|
||||||
Go to: `Control Panel\All Control Panel Items\Windows Firewall\Allowed apps`.
|
|
||||||
- ![WindowsFirewallAllowedApps.png](/images/photos/PHPStorm/Settings/WindowsFirewallAllowedApps.png)
|
|
||||||
|
|
||||||
- `hosts`
|
|
||||||
Edit: `C:\Windows\System32\drivers\etc\hosts`.
|
|
||||||
- ![WindowsFirewallAllowedApps.png](/images/photos/PHPStorm/Settings/hosts.png)
|
|
||||||
|
|
||||||
- [Enable xDebug on php-fpm](#enablePhpXdebug)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="Usage"></a>
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
<a name="UsagePHPStormRunExampleTest"></a>
|
|
||||||
### Run ExampleTest
|
|
||||||
- right-click on `tests/ExampleTest.php`
|
|
||||||
- Select: `Run 'ExampleTest.php'` or `Ctrl+Shift+F10`.
|
|
||||||
- Should pass!! You just ran a remote test via SSH!
|
|
||||||
|
|
||||||
<a name="UsagePHPStormDebugExampleTest"></a>
|
|
||||||
### Debug ExampleTest
|
|
||||||
- Open to edit: `tests/ExampleTest.php`
|
|
||||||
- Add a BreakPoint on line 16: `$this->visit('/')`
|
|
||||||
- right-click on `tests/ExampleTest.php`
|
|
||||||
- Select: `Debug 'ExampleTest.php'`.
|
|
||||||
- Should have stopped at the BreakPoint!! You are now debugging locally against a remote Laravel project via SSH!
|
|
||||||
- ![Remote Test Debugging Success](/images/photos/PHPStorm/RemoteTestDebuggingSuccess.png)
|
|
||||||
|
|
||||||
|
|
||||||
<a name="UsagePHPStormDebugSite"></a>
|
|
||||||
### Debug WebSite
|
|
||||||
- In case xDebug is disabled, from the `laradock` folder run:
|
|
||||||
`./php-fpm/xdebug start`.
|
|
||||||
- To switch xdebug off, run:
|
|
||||||
`./php-fpm/xdebug stop`
|
|
||||||
|
|
||||||
- Start Remote Debugging
|
|
||||||
- ![DebugRemoteOn](/images/photos/PHPStorm/DebugRemoteOn.png)
|
|
||||||
|
|
||||||
- Open to edit: `bootstrap/app.php`
|
|
||||||
- Add a BreakPoint on line 14: `$app = new Illuminate\Foundation\Application(`
|
|
||||||
- Reload [Laravel Site](http://laravel/)
|
|
||||||
- Should have stopped at the BreakPoint!! You are now debugging locally against a remote Laravel project via SSH!
|
|
||||||
- ![Remote Debugging Success](/images/photos/PHPStorm/RemoteDebuggingSuccess.png)
|
|
||||||
|
|
||||||
|
|
||||||
<a name="SSHintoWorkspace"></a>
|
|
||||||
## Let's shell into workspace
|
|
||||||
Assuming that you are in laradock folder, type:
|
|
||||||
`ssh -i workspace/insecure_id_rsa -p2222 root@laravel`
|
|
||||||
**Cha Ching!!!!**
|
|
||||||
- `workspace/insecure_id_rsa.ppk` may become corrupted. In which case:
|
|
||||||
- fire up `puttygen`
|
|
||||||
- import `workspace/insecure_id_rsa`
|
|
||||||
- save private key to `workspace/insecure_id_rsa.ppk`
|
|
||||||
|
|
||||||
<a name="InstallKiTTY"></a>
|
|
||||||
|
|
||||||
### KiTTY
|
|
||||||
[Kitty](http://www.9bis.net/kitty/) KiTTY is a fork from version 0.67 of PuTTY.
|
|
||||||
|
|
||||||
- Here are some settings that are working for me:
|
|
||||||
- ![Session](/images/photos/KiTTY/Session.png)
|
|
||||||
- ![Terminal](/images/photos/KiTTY/Terminal.png)
|
|
||||||
- ![Window](/images/photos/KiTTY/Window.png)
|
|
||||||
- ![WindowAppearance](/images/photos/KiTTY/WindowAppearance.png)
|
|
||||||
- ![Connection](/images/photos/KiTTY/Connection.png)
|
|
||||||
- ![ConnectionData](/images/photos/KiTTY/ConnectionData.png)
|
|
||||||
- ![ConnectionSSH](/images/photos/KiTTY/ConnectionSSH.png)
|
|
||||||
- ![ConnectionSSHAuth](/images/photos/KiTTY/ConnectionSSHAuth.png)
|
|
||||||
- ![TerminalShell](/images/photos/KiTTY/TerminalShell.png)
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
@ -565,13 +238,9 @@ Assuming that you are in laradock folder, type:
|
|||||||
<br>
|
<br>
|
||||||
|
|
||||||
<a name="Laravel-Dusk"></a>
|
<a name="Laravel-Dusk"></a>
|
||||||
# Running Laravel Dusk Tests
|
## Running Laravel Dusk Tests
|
||||||
|
|
||||||
- [Option 1: Without Selenium](#option1-dusk)
|
### Option 1: Without Selenium
|
||||||
- [Option 2: With Selenium](#option2-dusk)
|
|
||||||
|
|
||||||
<a name="option1-dusk"></a>
|
|
||||||
## Option 1: Without Selenium
|
|
||||||
|
|
||||||
- [Intro](#option1-dusk-intro)
|
- [Intro](#option1-dusk-intro)
|
||||||
- [Workspace Setup](#option1-workspace-setup)
|
- [Workspace Setup](#option1-workspace-setup)
|
||||||
@ -579,14 +248,12 @@ Assuming that you are in laradock folder, type:
|
|||||||
- [Choose Chrome Driver Version (Optional)](#option1-choose-chrome-driver-version)
|
- [Choose Chrome Driver Version (Optional)](#option1-choose-chrome-driver-version)
|
||||||
- [Run Dusk Tests](#option1-run-dusk-tests)
|
- [Run Dusk Tests](#option1-run-dusk-tests)
|
||||||
|
|
||||||
<a name="option1-dusk-intro"></a>
|
#### Intro
|
||||||
### Intro
|
|
||||||
|
|
||||||
This is a guide to run Dusk tests in your `workspace` container with headless
|
This is a guide to run Dusk tests in your `workspace` container with headless
|
||||||
google-chrome and chromedriver. It has been tested with Laravel 5.4 and 5.5.
|
google-chrome and chromedriver. It has been tested with Laravel 5.4 and 5.5.
|
||||||
|
|
||||||
<a name="option1-workspace-setup"></a>
|
#### Workspace Setup
|
||||||
### Workspace Setup
|
|
||||||
|
|
||||||
Update your .env with following entries:
|
Update your .env with following entries:
|
||||||
|
|
||||||
@ -606,8 +273,7 @@ Then run below to build your workspace.
|
|||||||
docker-compose build workspace
|
docker-compose build workspace
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="option1-application-setup"></a>
|
#### Application Setup
|
||||||
### Application Setup
|
|
||||||
|
|
||||||
Run a `workspace` container and you will be inside the container at `/var/www` directory.
|
Run a `workspace` container and you will be inside the container at `/var/www` directory.
|
||||||
|
|
||||||
@ -672,8 +338,7 @@ abstract class DuskTestCase extends BaseTestCase
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="option1-choose-chrome-driver-version"></a>
|
#### Choose Chrome Driver Version (Optional)
|
||||||
### Choose Chrome Driver Version (Optional)
|
|
||||||
|
|
||||||
You could choose to use either:
|
You could choose to use either:
|
||||||
|
|
||||||
@ -727,8 +392,7 @@ abstract class DuskTestCase extends BaseTestCase
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="option1-run-dusk-tests"></a>
|
#### Run Dusk Tests
|
||||||
### Run Dusk Tests
|
|
||||||
|
|
||||||
Run local server in `workspace` container and run Dusk tests.
|
Run local server in `workspace` container and run Dusk tests.
|
||||||
|
|
||||||
@ -745,8 +409,7 @@ PHPUnit 6.4.0 by Sebastian Bergmann and contributors.
|
|||||||
Time: 837 ms, Memory: 6.00MB
|
Time: 837 ms, Memory: 6.00MB
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="option2-dusk"></a>
|
### Option 2: With Selenium
|
||||||
## Option 2: With Selenium
|
|
||||||
|
|
||||||
- [Intro](#dusk-intro)
|
- [Intro](#dusk-intro)
|
||||||
- [DNS Setup](#dns-setup)
|
- [DNS Setup](#dns-setup)
|
||||||
@ -754,8 +417,7 @@ Time: 837 ms, Memory: 6.00MB
|
|||||||
- [Laravel Dusk Setup](#laravel-dusk-setup)
|
- [Laravel Dusk Setup](#laravel-dusk-setup)
|
||||||
- [Running Laravel Dusk Tests](#running-tests)
|
- [Running Laravel Dusk Tests](#running-tests)
|
||||||
|
|
||||||
<a name="dusk-intro"></a>
|
#### Intro
|
||||||
### Intro
|
|
||||||
Setting up Laravel Dusk tests to run with Laradock appears be something that
|
Setting up Laravel Dusk tests to run with Laradock appears be something that
|
||||||
eludes most Laradock users. This guide is designed to show you how to wire them
|
eludes most Laradock users. This guide is designed to show you how to wire them
|
||||||
up to work together. This guide is written with macOS and Linux in mind. As such,
|
up to work together. This guide is written with macOS and Linux in mind. As such,
|
||||||
@ -765,8 +427,7 @@ for Windows-specific instructions.
|
|||||||
This guide assumes you know how to use a DNS forwarder such as `dnsmasq` or are comfortable
|
This guide assumes you know how to use a DNS forwarder such as `dnsmasq` or are comfortable
|
||||||
with editing the `/etc/hosts` file for one-off DNS changes.
|
with editing the `/etc/hosts` file for one-off DNS changes.
|
||||||
|
|
||||||
<a name="dns-setup"></a>
|
#### DNS Setup
|
||||||
### DNS Setup
|
|
||||||
According to RFC-2606, only four TLDs are reserved for local testing[^1]:
|
According to RFC-2606, only four TLDs are reserved for local testing[^1]:
|
||||||
|
|
||||||
- `.test`
|
- `.test`
|
||||||
@ -799,8 +460,7 @@ For example, in your `/etc/hosts` file:
|
|||||||
This will ensure that when navigating to `myapp.test`, it will route the
|
This will ensure that when navigating to `myapp.test`, it will route the
|
||||||
request to `127.0.0.1` which will be handled by Nginx in Laradock.
|
request to `127.0.0.1` which will be handled by Nginx in Laradock.
|
||||||
|
|
||||||
<a name="docker-compose"></a>
|
#### Docker Compose setup
|
||||||
### Docker Compose setup
|
|
||||||
In order to make the Selenium container talk to the Nginx container appropriately,
|
In order to make the Selenium container talk to the Nginx container appropriately,
|
||||||
the `docker-compose.yml` needs to be edited to accommodate this. Make the following
|
the `docker-compose.yml` needs to be edited to accommodate this. Make the following
|
||||||
changes:
|
changes:
|
||||||
@ -822,8 +482,7 @@ the Selenium container to make requests to the Nginx container, which is
|
|||||||
necessary for running Dusk tests. These changes also link the `nginx` environment
|
necessary for running Dusk tests. These changes also link the `nginx` environment
|
||||||
variable to the domain you wired up in your hosts file.
|
variable to the domain you wired up in your hosts file.
|
||||||
|
|
||||||
<a name="laravel-dusk-setup"></a>
|
#### Laravel Dusk Setup
|
||||||
### Laravel Dusk Setup
|
|
||||||
|
|
||||||
In order to make Laravel Dusk make the proper request to the Selenium container,
|
In order to make Laravel Dusk make the proper request to the Selenium container,
|
||||||
you have to edit the `DuskTestCase.php` file that's provided on the initial
|
you have to edit the `DuskTestCase.php` file that's provided on the initial
|
||||||
@ -833,13 +492,13 @@ Remote Web Driver attempts to use to set up the Selenium session.
|
|||||||
One recommendation for this is to add a separate config option in your `.env.dusk.local`
|
One recommendation for this is to add a separate config option in your `.env.dusk.local`
|
||||||
so it's still possible to run your Dusk tests locally should you want to.
|
so it's still possible to run your Dusk tests locally should you want to.
|
||||||
|
|
||||||
#### .env.dusk.local
|
##### .env.dusk.local
|
||||||
```
|
```
|
||||||
...
|
...
|
||||||
USE_SELENIUM=true
|
USE_SELENIUM=true
|
||||||
```
|
```
|
||||||
|
|
||||||
#### DuskTestCase.php
|
##### DuskTestCase.php
|
||||||
```php
|
```php
|
||||||
abstract class DuskTestCase extends BaseTestCase
|
abstract class DuskTestCase extends BaseTestCase
|
||||||
{
|
{
|
||||||
@ -859,8 +518,7 @@ abstract class DuskTestCase extends BaseTestCase
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
<a name="running-tests"></a>
|
#### Running Laravel Dusk Tests
|
||||||
### Running Laravel Dusk Tests
|
|
||||||
|
|
||||||
Now that you have everything set up, to run your Dusk tests, you have to SSH
|
Now that you have everything set up, to run your Dusk tests, you have to SSH
|
||||||
into the workspace container as you normally would:
|
into the workspace container as you normally would:
|
||||||
@ -885,3 +543,326 @@ This invokes the Dusk command from inside the workspace container but when the s
|
|||||||
execution, it returns your session to your project directory.
|
execution, it returns your session to your project directory.
|
||||||
|
|
||||||
[^1]: [Don't Use .dev for Development](https://iyware.com/dont-use-dev-for-development/)
|
[^1]: [Don't Use .dev for Development](https://iyware.com/dont-use-dev-for-development/)
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="PHPStorm-Debugging"></a>
|
||||||
|
## PHPStorm XDebug Setup
|
||||||
|
|
||||||
|
- [Intro](#Intro)
|
||||||
|
- [Installation](#Installation)
|
||||||
|
- [Customize laradock/docker-compose.yml](#CustomizeDockerCompose)
|
||||||
|
- [Clean House](#InstallCleanHouse)
|
||||||
|
- [Laradock Dial Tone](#InstallLaradockDialTone)
|
||||||
|
- [hosts](#AddToHosts)
|
||||||
|
- [Firewall](#FireWall)
|
||||||
|
- [Enable xDebug on php-fpm](#enablePhpXdebug)
|
||||||
|
- [PHPStorm Settings](#InstallPHPStorm)
|
||||||
|
- [Configs](#InstallPHPStormConfigs)
|
||||||
|
- [Usage](#Usage)
|
||||||
|
- [Laravel](#UsageLaravel)
|
||||||
|
- [Run ExampleTest](#UsagePHPStormRunExampleTest)
|
||||||
|
- [Debug ExampleTest](#UsagePHPStormDebugExampleTest)
|
||||||
|
- [Debug Web Site](#UsagePHPStormDebugSite)
|
||||||
|
- [SSH into workspace](#SSHintoWorkspace)
|
||||||
|
- [KiTTY](#InstallKiTTY)
|
||||||
|
|
||||||
|
### 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`,
|
||||||
|
you should be able to adjust accordingly. This guide was written based on Docker for Windows Native.
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
- This guide assumes the following:
|
||||||
|
- 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`.
|
||||||
|
|
||||||
|
### hosts
|
||||||
|
- Add `laravel` to your hosts file located on Windows 10 at `C:\Windows\System32\drivers\etc\hosts`. It should be set to the IP of your running container. Mine is: `10.0.75.2`
|
||||||
|
On Windows you can find it by opening Windows `Hyper-V Manager`.
|
||||||
|
- ![Windows Hyper-V Manager](images/photos/PHPStorm/Settings/WindowsHyperVManager.png)
|
||||||
|
|
||||||
|
- [Hosts File Editor](https://github.com/scottlerch/HostsFileEditor) makes it easy to change your hosts file.
|
||||||
|
- Set `laravel` to your docker host IP. See [Example](images/photos/SimpleHostsEditor/AddHost_laravel.png).
|
||||||
|
|
||||||
|
|
||||||
|
### Firewall
|
||||||
|
Your PHPStorm will need to be able to receive a connection from PHP xdebug either your running workspace or php-fpm containers on port 9000. This means that your Windows Firewall should either enable connections from the Application PHPStorm OR the port.
|
||||||
|
|
||||||
|
- It is important to note that if the Application PHPStorm is NOT enabled in the firewall, you will not be able to recreate a rule to override that.
|
||||||
|
- Also be aware that if you are installing/upgrade different versions of PHPStorm, you MAY have orphaned references to PHPStorm in your Firewall! You may decide to remove orphaned references however in either case, make sure that they are set to receive public TCP traffic.
|
||||||
|
|
||||||
|
#### Edit laradock/docker-compose.yml
|
||||||
|
Set the following variables:
|
||||||
|
```
|
||||||
|
### Workspace Utilities Container ###############
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
build:
|
||||||
|
context: ./workspace
|
||||||
|
args:
|
||||||
|
- INSTALL_XDEBUG=true
|
||||||
|
- INSTALL_WORKSPACE_SSH=true
|
||||||
|
...
|
||||||
|
|
||||||
|
|
||||||
|
### PHP-FPM Container #####################
|
||||||
|
|
||||||
|
php-fpm:
|
||||||
|
build:
|
||||||
|
context: ./php-fpm
|
||||||
|
args:
|
||||||
|
- INSTALL_XDEBUG=true
|
||||||
|
...
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Edit xdebug.ini files
|
||||||
|
- `laradock/workspace/xdebug.ini`
|
||||||
|
- `laradock/php-fpm/xdebug.ini`
|
||||||
|
|
||||||
|
Set the following variables:
|
||||||
|
|
||||||
|
```
|
||||||
|
xdebug.remote_autostart=1
|
||||||
|
xdebug.remote_enable=1
|
||||||
|
xdebug.remote_connect_back=1
|
||||||
|
xdebug.cli_color=1
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### Need to clean house first?
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
- 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).
|
||||||
|
|
||||||
|
`docker ps -a | awk '{ print $1,$2 }' | grep laradock_ | awk '{print $1}' | xargs -I {} docker rm {}`
|
||||||
|
|
||||||
|
- Delete all images containing `laradock`.
|
||||||
|
|
||||||
|
`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:** Some may fail with:
|
||||||
|
`Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images`
|
||||||
|
|
||||||
|
- I added this to my `.bashrc` to remove orphaned images.
|
||||||
|
|
||||||
|
```
|
||||||
|
dclean() {
|
||||||
|
processes=`docker ps -q -f status=exited`
|
||||||
|
if [ -n "$processes" ]; then
|
||||||
|
docker rm $processes
|
||||||
|
fi
|
||||||
|
|
||||||
|
images=`docker images -q -f dangling=true`
|
||||||
|
if [ -n "$images" ]; then
|
||||||
|
docker rmi $images
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- 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_* images
|
||||||
|
dcleanlaradockfunction()
|
||||||
|
{
|
||||||
|
echo 'Removing ALL containers associated with laradock'
|
||||||
|
docker ps -a | awk '{ print $1,$2 }' | grep laradock | awk '{print $1}' | xargs -I {} docker rm {}
|
||||||
|
|
||||||
|
# remove ALL images associated with laradock_
|
||||||
|
# does NOT delete laradock/* which are hub images
|
||||||
|
echo 'Removing ALL images associated with laradock_'
|
||||||
|
docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}
|
||||||
|
|
||||||
|
echo 'Listing all laradock docker hub images...'
|
||||||
|
docker images | grep laradock
|
||||||
|
|
||||||
|
echo 'dcleanlaradock completed'
|
||||||
|
}
|
||||||
|
# associate the above function with an alias
|
||||||
|
# so can recall/lookup by typing 'alias'
|
||||||
|
alias dcleanlaradock=dcleanlaradockfunction
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Let's get a dial-tone with Laravel
|
||||||
|
|
||||||
|
```
|
||||||
|
# barebones at this point
|
||||||
|
docker-compose up -d nginx mysql
|
||||||
|
|
||||||
|
# run
|
||||||
|
docker-compose ps
|
||||||
|
|
||||||
|
# Should see:
|
||||||
|
Name Command State Ports
|
||||||
|
-----------------------------------------------------------------------------------------------------------
|
||||||
|
laradock_mysql_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
|
||||||
|
laradock_nginx_1 nginx Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
|
||||||
|
laradock_php-fpm_1 php-fpm Up 9000/tcp
|
||||||
|
laradock_volumes_data_1 true Exit 0
|
||||||
|
laradock_volumes_source_1 true Exit 0
|
||||||
|
laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222->22/tcp
|
||||||
|
```
|
||||||
|
|
||||||
|
### Enable xDebug on php-fpm
|
||||||
|
|
||||||
|
In a host terminal sitting in the laradock folder, run: `./php-fpm/xdebug status`
|
||||||
|
You should see something like the following:
|
||||||
|
|
||||||
|
```
|
||||||
|
xDebug status
|
||||||
|
laradock_php-fpm_1
|
||||||
|
PHP 7.0.9 (cli) (built: Aug 10 2016 19:45:48) ( NTS )
|
||||||
|
Copyright (c) 1997-2016 The PHP Group
|
||||||
|
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
|
||||||
|
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
|
||||||
|
```
|
||||||
|
|
||||||
|
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
|
||||||
|
`php-fpm` is started and listening for debug info on port 9000.
|
||||||
|
|
||||||
|
|
||||||
|
### PHPStorm Settings
|
||||||
|
|
||||||
|
- Here are some settings that are known to work:
|
||||||
|
- `Settings/BuildDeploymentConnection`
|
||||||
|
- ![Settings/BuildDeploymentConnection](/images/photos/PHPStorm/Settings/BuildDeploymentConnection.png)
|
||||||
|
|
||||||
|
- `Settings/BuildDeploymentConnectionMappings`
|
||||||
|
- ![Settings/BuildDeploymentConnectionMappings](/images/photos/PHPStorm/Settings/BuildDeploymentConnectionMappings.png)
|
||||||
|
|
||||||
|
- `Settings/BuildDeploymentDebugger`
|
||||||
|
- ![Settings/BuildDeploymentDebugger](/images/photos/PHPStorm/Settings/BuildDeploymentDebugger.png)
|
||||||
|
|
||||||
|
- `Settings/EditRunConfigurationRemoteWebDebug`
|
||||||
|
- ![Settings/EditRunConfigurationRemoteWebDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png)
|
||||||
|
|
||||||
|
- `Settings/EditRunConfigurationRemoteExampleTestDebug`
|
||||||
|
- ![Settings/EditRunConfigurationRemoteExampleTestDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png)
|
||||||
|
|
||||||
|
- `Settings/LangsPHPDebug`
|
||||||
|
- ![Settings/LangsPHPDebug](/images/photos/PHPStorm/Settings/LangsPHPDebug.png)
|
||||||
|
|
||||||
|
- `Settings/LangsPHPInterpreters`
|
||||||
|
- ![Settings/LangsPHPInterpreters](/images/photos/PHPStorm/Settings/LangsPHPInterpreters.png)
|
||||||
|
|
||||||
|
- `Settings/LangsPHPPHPUnit`
|
||||||
|
- ![Settings/LangsPHPPHPUnit](/images/photos/PHPStorm/Settings/LangsPHPPHPUnit.png)
|
||||||
|
|
||||||
|
- `Settings/LangsPHPServers`
|
||||||
|
- ![Settings/LangsPHPServers](/images/photos/PHPStorm/Settings/LangsPHPServers.png)
|
||||||
|
|
||||||
|
- `RemoteHost`
|
||||||
|
To switch on this view, go to: `Menu/Tools/Deployment/Browse Remote Host`.
|
||||||
|
- ![RemoteHost](/images/photos/PHPStorm/RemoteHost.png)
|
||||||
|
|
||||||
|
- `RemoteWebDebug`
|
||||||
|
- ![DebugRemoteOn](/images/photos/PHPStorm/DebugRemoteOn.png)
|
||||||
|
|
||||||
|
- `EditRunConfigurationRemoteWebDebug`
|
||||||
|
Go to: `Menu/Run/Edit Configurations`.
|
||||||
|
- ![EditRunConfigurationRemoteWebDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png)
|
||||||
|
|
||||||
|
- `EditRunConfigurationRemoteExampleTestDebug`
|
||||||
|
Go to: `Menu/Run/Edit Configurations`.
|
||||||
|
- ![EditRunConfigurationRemoteExampleTestDebug](/images/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png)
|
||||||
|
|
||||||
|
- `WindowsFirewallAllowedApps`
|
||||||
|
Go to: `Control Panel\All Control Panel Items\Windows Firewall\Allowed apps`.
|
||||||
|
- ![WindowsFirewallAllowedApps.png](/images/photos/PHPStorm/Settings/WindowsFirewallAllowedApps.png)
|
||||||
|
|
||||||
|
- `hosts`
|
||||||
|
Edit: `C:\Windows\System32\drivers\etc\hosts`.
|
||||||
|
- ![WindowsFirewallAllowedApps.png](/images/photos/PHPStorm/Settings/hosts.png)
|
||||||
|
|
||||||
|
- [Enable xDebug on php-fpm](#enablePhpXdebug)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
#### Run ExampleTest
|
||||||
|
- right-click on `tests/ExampleTest.php`
|
||||||
|
- Select: `Run 'ExampleTest.php'` or `Ctrl+Shift+F10`.
|
||||||
|
- Should pass!! You just ran a remote test via SSH!
|
||||||
|
|
||||||
|
#### Debug ExampleTest
|
||||||
|
- Open to edit: `tests/ExampleTest.php`
|
||||||
|
- Add a BreakPoint on line 16: `$this->visit('/')`
|
||||||
|
- right-click on `tests/ExampleTest.php`
|
||||||
|
- Select: `Debug 'ExampleTest.php'`.
|
||||||
|
- Should have stopped at the BreakPoint!! You are now debugging locally against a remote Laravel project via SSH!
|
||||||
|
- ![Remote Test Debugging Success](/images/photos/PHPStorm/RemoteTestDebuggingSuccess.png)
|
||||||
|
|
||||||
|
#### Debug WebSite
|
||||||
|
- In case xDebug is disabled, from the `laradock` folder run:
|
||||||
|
`./php-fpm/xdebug start`.
|
||||||
|
- To switch xdebug off, run:
|
||||||
|
`./php-fpm/xdebug stop`
|
||||||
|
|
||||||
|
- Start Remote Debugging
|
||||||
|
- ![DebugRemoteOn](/images/photos/PHPStorm/DebugRemoteOn.png)
|
||||||
|
|
||||||
|
- Open to edit: `bootstrap/app.php`
|
||||||
|
- Add a BreakPoint on line 14: `$app = new Illuminate\Foundation\Application(`
|
||||||
|
- Reload [Laravel Site](http://laravel/)
|
||||||
|
- Should have stopped at the BreakPoint!! You are now debugging locally against a remote Laravel project via SSH!
|
||||||
|
- ![Remote Debugging Success](/images/photos/PHPStorm/RemoteDebuggingSuccess.png)
|
||||||
|
|
||||||
|
|
||||||
|
### Let's shell into workspace
|
||||||
|
Assuming that you are in laradock folder, type:
|
||||||
|
`ssh -i workspace/insecure_id_rsa -p2222 root@laravel`
|
||||||
|
**Cha Ching!!!!**
|
||||||
|
- `workspace/insecure_id_rsa.ppk` may become corrupted. In which case:
|
||||||
|
- fire up `puttygen`
|
||||||
|
- import `workspace/insecure_id_rsa`
|
||||||
|
- save private key to `workspace/insecure_id_rsa.ppk`
|
||||||
|
|
||||||
|
#### KiTTY
|
||||||
|
[Kitty](http://www.9bis.net/kitty/) KiTTY is a fork from version 0.67 of PuTTY.
|
||||||
|
|
||||||
|
- Here are some settings that are working for me:
|
||||||
|
- ![Session](/images/photos/KiTTY/Session.png)
|
||||||
|
- ![Terminal](/images/photos/KiTTY/Terminal.png)
|
||||||
|
- ![Window](/images/photos/KiTTY/Window.png)
|
||||||
|
- ![WindowAppearance](/images/photos/KiTTY/WindowAppearance.png)
|
||||||
|
- ![Connection](/images/photos/KiTTY/Connection.png)
|
||||||
|
- ![ConnectionData](/images/photos/KiTTY/ConnectionData.png)
|
||||||
|
- ![ConnectionSSH](/images/photos/KiTTY/ConnectionSSH.png)
|
||||||
|
- ![ConnectionSSHAuth](/images/photos/KiTTY/ConnectionSSHAuth.png)
|
||||||
|
- ![TerminalShell](/images/photos/KiTTY/TerminalShell.png)
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<a name="Setup remote debugging (PhpStorm)"></a>
|
||||||
|
## Setup remote debugging for PhpStorm on Linux
|
||||||
|
|
||||||
|
- Make sure you have followed the steps above in the [Install Xdebug section](#install-xdebug).
|
||||||
|
|
||||||
|
- Make sure Xdebug accepts connections and listens on port 9000. (Should be default configuration).
|
||||||
|
|
||||||
|
![Debug Configuration](/images/photos/PHPStorm/linux/configuration/debugConfiguration.png "Debug Configuration").
|
||||||
|
|
||||||
|
- Create a server with name `laradock` (matches **PHP_IDE_CONFIG** key in environment file) and make sure to map project root path with server correctly.
|
||||||
|
|
||||||
|
![Server Configuration](/images/photos/PHPStorm/linux/configuration/serverConfiguration.png "Server Configuration").
|
||||||
|
|
||||||
|
- Start listening for debug connections, place a breakpoint and you are good to go !
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Help & Questions
|
title: 5. Help & Questions
|
||||||
type: index
|
type: index
|
||||||
weight: 5
|
weight: 5
|
||||||
---
|
---
|
||||||
@ -7,3 +7,121 @@ 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).
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Common-Problems"></a>
|
||||||
|
# Common Problems
|
||||||
|
|
||||||
|
*Here's a list of the common problems you might face, and the possible solutions.*
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
## I see a blank (white) page instead of the Laravel 'Welcome' page!
|
||||||
|
|
||||||
|
Run the following command from the Laravel root directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo chmod -R 777 storage bootstrap/cache
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
## I see "Welcome to nginx" instead of the Laravel App!
|
||||||
|
|
||||||
|
Use `http://127.0.0.1` instead of `http://localhost` in your browser.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
## I see an error message containing `address already in use` or `port is already allocated`
|
||||||
|
|
||||||
|
Make sure the ports for the services that you are trying to run (22, 80, 443, 3306, etc.) are not being used already by other programs on the host, such as a built in `apache`/`httpd` service or other development tools you have installed.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
## I get NGINX error 404 Not Found on Windows.
|
||||||
|
|
||||||
|
1. Go to docker Settings on your Windows machine.
|
||||||
|
2. Click on the `Shared Drives` tab and check the drive that contains your project files.
|
||||||
|
3. Enter your windows username and password.
|
||||||
|
4. Go to the `reset` tab and click restart docker.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
## The time in my services does not match the current time
|
||||||
|
|
||||||
|
1. Make sure you've [changed the timezone](#Change-the-timezone).
|
||||||
|
2. Stop and rebuild the containers (`docker-compose up -d --build <services>`)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
## I get MySQL connection refused
|
||||||
|
|
||||||
|
This error sometimes happens because your Laravel application isn't running on the container localhost IP (Which is 127.0.0.1). Steps to fix it:
|
||||||
|
|
||||||
|
* Option A
|
||||||
|
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`
|
||||||
|
|
||||||
|
## I get stuck when building nginx on `fetch http://mirrors.aliyun.com/alpine/v3.5/main/x86_64/APKINDEX.tar.gz`
|
||||||
|
|
||||||
|
As stated on [#749](https://github.com/laradock/laradock/issues/749#issuecomment-419652646), Already fixed,just set `CHANGE_SOURCE` to false.
|
||||||
|
|
||||||
|
## Custom composer repo packagist url and npm registry url
|
||||||
|
|
||||||
|
In China, the origin source of composer and npm is very slow. You can add `WORKSPACE_NPM_REGISTRY` and `WORKSPACE_COMPOSER_REPO_PACKAGIST` config in `.env` to use your custom source.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```bash
|
||||||
|
WORKSPACE_NPM_REGISTRY=https://registry.npm.taobao.org
|
||||||
|
WORKSPACE_COMPOSER_REPO_PACKAGIST=https://packagist.phpcomposer.com
|
||||||
|
```
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
## I get `Module build failed: Error: write EPIPE` while compiling react application
|
||||||
|
|
||||||
|
When you run `npm build` or `yarn dev` building a react application using webpack with elixir you may receive a `Error: write EPIPE` while processing .jpg images.
|
||||||
|
|
||||||
|
This is caused of an outdated library for processing **.jpg files** in ubuntu 16.04.
|
||||||
|
|
||||||
|
To fix the problem you can follow those steps
|
||||||
|
|
||||||
|
1 - Open the `.env`.
|
||||||
|
|
||||||
|
2 - Search for `WORKSPACE_INSTALL_LIBPNG` or add the key if missing.
|
||||||
|
|
||||||
|
3 - Set the value to true:
|
||||||
|
|
||||||
|
```dotenv
|
||||||
|
WORKSPACE_INSTALL_LIBPNG=true
|
||||||
|
```
|
||||||
|
|
||||||
|
4 - Finally rebuild the workspace image
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose build workspace
|
||||||
|
```
|
||||||
|
|
||||||
|
@ -1,24 +1,51 @@
|
|||||||
---
|
---
|
||||||
title: Introduction
|
title: 1. Introduction
|
||||||
type: index
|
type: index
|
||||||
weight: 1
|
weight: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
## Use Docker First - Then Learn About It Later
|
||||||
|
|
||||||
|
Laradock is a PHP development environment that runs on Docker.
|
||||||
|
|
||||||
|
Supports a variety of useful Docker Images, pre-configured to provide a wonderful PHP development environment.
|
||||||
|
|
||||||
|
|
||||||
A full PHP development environment for Docker.
|
![](https://raw.githubusercontent.com/laradock/laradock/master/.github/home-page-images/laradock-logo.jpg)
|
||||||
|
|
||||||
Includes pre-packaged Docker Images, all pre-configured to provide a wonderful PHP development environment.
|
|
||||||
|
|
||||||
Laradock is well known in the Laravel community, as the project started with single focus on running Laravel projects on Docker. Later and due to the large adoption from the PHP community, it started supporting other PHP projects like Symfony, CodeIgniter, WordPress, Drupal...
|
|
||||||
|
|
||||||
|
|
||||||
![](https://s19.postimg.org/jblfytw9f/laradock-logo.jpg)
|
|
||||||
|
|
||||||
|
<a name="sponsors"></a>
|
||||||
|
## Sponsors
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<!-- Golden Sponsors -->
|
||||||
|
<a href="https://edubirdie.com/?ref=Laradock" target="_blank">
|
||||||
|
<img src="https://raw.githubusercontent.com/laradock/laradock/master/.github/home-page-images/sponsor-1.png?raw=true" width="300px" alt="Writing essays service Edubirdie"/>
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<!-- OpenCollective Sponsors -->
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/0/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/0/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/1/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/1/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/2/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/2/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/3/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/3/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/4/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/4/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/5/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/5/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/6/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/6/avatar.svg"></a>
|
||||||
|
<a href="https://opencollective.com/laradock/sponsor/7/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/7/avatar.svg"></a>
|
||||||
|
|
||||||
|
For basic sponsorships go to [Open Collective](https://opencollective.com/laradock#sponsor), for golden sponsorships contact <a href = "mailto: support@laradock.io">support@laradock.io</a>.
|
||||||
|
<br>
|
||||||
|
*Your logo will show up on the [github repository](https://github.com/laradock/laradock/) index page and the [documentation](http://laradock.io/) main page.*
|
||||||
|
|
||||||
## Quick Overview
|
## Quick Overview
|
||||||
|
|
||||||
Let's see how easy it is to install `NGINX`, `PHP`, `Composer`, `MySQL`, `Redis` and `Beanstalkd`:
|
Let's see how easy it is to setup our demo stack `PHP`, `NGINX`, `MySQL`, `Redis` and `Composer`:
|
||||||
|
|
||||||
1 - Clone Laradock inside your PHP project:
|
1 - Clone Laradock inside your PHP project:
|
||||||
|
|
||||||
@ -60,8 +87,8 @@ That's it! enjoy :)
|
|||||||
|
|
||||||
- Easy switch between PHP versions: 7.3, 7.2, 7.1, 5.6...
|
- Easy switch between PHP versions: 7.3, 7.2, 7.1, 5.6...
|
||||||
- Choose your favorite database engine: MySQL, Postgres, MariaDB...
|
- Choose your favorite database engine: MySQL, Postgres, MariaDB...
|
||||||
- Run your own combination of software: Memcached, HHVM, Beanstalkd...
|
- Run your own stack: Memcached, HHVM, RabbitMQ...
|
||||||
- Every software runs on a separate container: PHP-FPM, NGINX, PHP-CLI...
|
- Each software runs on its own container: PHP-FPM, NGINX, PHP-CLI...
|
||||||
- Easy to customize any container, with simple edit to the `Dockerfile`.
|
- Easy to customize any container, with simple edit to the `Dockerfile`.
|
||||||
- All Images extends from an official base Image. (Trusted base Images).
|
- All Images extends from an official base Image. (Trusted base Images).
|
||||||
- Pre-configured NGINX to host any code at your root directory.
|
- Pre-configured NGINX to host any code at your root directory.
|
||||||
@ -71,39 +98,131 @@ That's it! enjoy :)
|
|||||||
- Latest version of the Docker Compose file (`docker-compose`).
|
- Latest version of the Docker Compose file (`docker-compose`).
|
||||||
- Everything is visible and editable.
|
- Everything is visible and editable.
|
||||||
- Fast Images Builds.
|
- Fast Images Builds.
|
||||||
- More to come every week..
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="Supported-Containers"></a>
|
<a name="Supported-Containers"></a>
|
||||||
## Supported Software (Images)
|
## Supported Software (Docker Images)
|
||||||
|
|
||||||
In adhering to the separation of concerns principle as promoted by Docker, Laradock runs each software on its own Container.
|
> Laradock, adheres to the 'separation of concerns' principle, thus it runs each software on its own Docker Container.
|
||||||
You can turn On/Off as many instances of as any container without worrying about the configurations, everything works like a charm.
|
> You can turn On/Off as many instances as you want without worrying about the configurations.
|
||||||
|
|
||||||
|
> To run a chosen container from the list below, run `docker-compose up -d {container-name}`.
|
||||||
|
> The container name `{container-name}` is the same as its folder name. Example to run the "PHP FPM" container use the name "php-fpm".
|
||||||
|
|
||||||
|
- **Web Servers:**
|
||||||
|
- NGINX
|
||||||
|
- Apache2
|
||||||
|
- Caddy
|
||||||
|
|
||||||
|
- **Load Balancers:**
|
||||||
|
- HAProxy
|
||||||
|
- Traefik
|
||||||
|
|
||||||
- **Database Engines:**
|
|
||||||
MySQL - MariaDB - Percona - MongoDB - Neo4j - RethinkDB - MSSQL - PostgreSQL - Postgres-PostGIS.
|
|
||||||
- **Database Management:**
|
|
||||||
PhpMyAdmin - Adminer - PgAdmin
|
|
||||||
- **Cache Engines:**
|
|
||||||
Redis - Memcached - Aerospike
|
|
||||||
- **PHP Servers:**
|
|
||||||
NGINX - Apache2 - Caddy
|
|
||||||
- **PHP Compilers:**
|
- **PHP Compilers:**
|
||||||
PHP FPM - HHVM
|
- PHP FPM
|
||||||
- **Message Queueing:**
|
- HHVM
|
||||||
Beanstalkd - RabbitMQ - PHP Worker
|
|
||||||
- **Queueing Management:**
|
|
||||||
Beanstalkd Console - RabbitMQ Console
|
|
||||||
- **Random Tools:**
|
|
||||||
Mailu - HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Gitlab - Mailhog - MailDev - Minio - Varnish - Swoole - NetData - Portainer - Laravel Echo - Phalcon...
|
|
||||||
|
|
||||||
Laradock introduces the **Workspace** Image, as a development environment.
|
- **Database Management Systems:**
|
||||||
It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose.
|
- MySQL
|
||||||
|
- PostgreSQL
|
||||||
|
- PostGIS
|
||||||
|
- MariaDB
|
||||||
|
- Percona
|
||||||
|
- MSSQL
|
||||||
|
- MongoDB
|
||||||
|
- MongoDB Web UI
|
||||||
|
- Neo4j
|
||||||
|
- CouchDB
|
||||||
|
- RethinkDB
|
||||||
|
- Cassandra
|
||||||
|
|
||||||
**Workspace Image Tools**
|
|
||||||
PHP CLI - Composer - Git - Linuxbrew - Node - V8JS - Gulp - SQLite - xDebug - Envoy - Deployer - Vim - Yarn - SOAP - Drush - WP-CLI...
|
- **Database Management Apps:**
|
||||||
|
- PhpMyAdmin
|
||||||
|
- Adminer
|
||||||
|
- PgAdmin
|
||||||
|
|
||||||
|
- **Cache Engines:**
|
||||||
|
- Redis
|
||||||
|
- Redis Web UI
|
||||||
|
- Redis Cluster
|
||||||
|
- Memcached
|
||||||
|
- Aerospike
|
||||||
|
- Varnish
|
||||||
|
|
||||||
|
- **Message Brokers:**
|
||||||
|
- RabbitMQ
|
||||||
|
- RabbitMQ Admin Console
|
||||||
|
- Beanstalkd
|
||||||
|
- Beanstalkd Admin Console
|
||||||
|
- Eclipse Mosquitto
|
||||||
|
- PHP Worker
|
||||||
|
- Laravel Horizon
|
||||||
|
|
||||||
|
- **Mail Servers:**
|
||||||
|
- Mailu
|
||||||
|
- Mailhog
|
||||||
|
- MailDev
|
||||||
|
|
||||||
|
- **Log Management:**
|
||||||
|
- GrayLog
|
||||||
|
|
||||||
|
- **Testing:**
|
||||||
|
- Selenium
|
||||||
|
|
||||||
|
- **Monitoring:**
|
||||||
|
- Grafana
|
||||||
|
- NetData
|
||||||
|
|
||||||
|
- **Search Engines:**
|
||||||
|
- ElasticSearch
|
||||||
|
- Apache Solr
|
||||||
|
- Manticore Search
|
||||||
|
|
||||||
|
- **IDE's**
|
||||||
|
- ICE Coder
|
||||||
|
- Theia
|
||||||
|
- Web IDE
|
||||||
|
|
||||||
|
- **Miscellaneous:**
|
||||||
|
- Workspace *(Laradock container that includes a rich set of pre-configured useful tools)*
|
||||||
|
- `PHP CLI`
|
||||||
|
- `Composer`
|
||||||
|
- `Git`
|
||||||
|
- `Vim`
|
||||||
|
- `xDebug`
|
||||||
|
- `Linuxbrew`
|
||||||
|
- `Node`
|
||||||
|
- `V8JS`
|
||||||
|
- `Gulp`
|
||||||
|
- `SQLite`
|
||||||
|
- `Laravel Envoy`
|
||||||
|
- `Deployer`
|
||||||
|
- `Yarn`
|
||||||
|
- `SOAP`
|
||||||
|
- `Drush`
|
||||||
|
- `Wordpress CLI`
|
||||||
|
- Apache ZooKeeper *(Centralized service for distributed systems to a hierarchical key-value store)*
|
||||||
|
- Kibana *(Visualize your Elasticsearch data and navigate the Elastic Stack)*
|
||||||
|
- LogStash *(Server-side data processing pipeline that ingests data from a multitude of sources simultaneously)*
|
||||||
|
- Jenkins *(automation server, that provides plugins to support building, deploying and automating any project)*
|
||||||
|
- Certbot *(Automatically enable HTTPS on your website)*
|
||||||
|
- Swoole *(Production-Grade Async programming Framework for PHP)*
|
||||||
|
- SonarQube *(continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs and more)*
|
||||||
|
- Gitlab *(A single application for the entire software development lifecycle)*
|
||||||
|
- PostGIS *(Database extender for PostgreSQL. It adds support for geographic objects allowing location queries to be run in SQL)*
|
||||||
|
- Blackfire *(Empowers all PHP developers and IT/Ops to continuously verify and improve their app's performance)*
|
||||||
|
- Laravel Echo *(Bring the power of WebSockets to your Laravel applications)*
|
||||||
|
- Phalcon *(A PHP web framework based on the model–view–controller pattern)*
|
||||||
|
- Minio *(Cloud storage server released under Apache License v2, compatible with Amazon S3)*
|
||||||
|
- AWS EB CLI *(CLI that helps you deploy and manage your AWS Elastic Beanstalk applications and environments)*
|
||||||
|
- Thumbor *(Photo thumbnail service)*
|
||||||
|
- IPython *(Provides a rich architecture for interactive computing)*
|
||||||
|
- Jupyter Hub *(Jupyter notebook for multiple users)*
|
||||||
|
- Portainer *(Build and manage your Docker environments with ease)*
|
||||||
|
- Docker Registry *(The Docker Registry implementation for storing and distributing Docker images)*
|
||||||
|
- Docker Web UI *(A browser-based solution for browsing and modifying a private Docker registry)*
|
||||||
|
|
||||||
You can choose, which tools to install in your workspace container and other containers, from the `.env` file.
|
You can choose, which tools to install in your workspace container and other containers, from the `.env` file.
|
||||||
|
|
||||||
@ -112,30 +231,7 @@ You can choose, which tools to install in your workspace container and other con
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
If you can't find your Software in the list, build it yourself and submit it. Contributions are welcomed :)
|
*If you can't find your Software in the list, build it yourself and submit it. Contributions are welcomed :)*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Sponsors
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Support this project by becoming a sponsor.
|
|
||||||
|
|
||||||
Your logo will show up on the [github repository](https://github.com/laradock/laradock/) index page and the [documentation](http://laradock.io/) main page, with a link to your website. [[Become a sponsor](https://opencollective.com/laradock#sponsor)]
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/laradock/sponsor/0/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/0/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/laradock/sponsor/1/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/1/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/laradock/sponsor/2/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/2/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/laradock/sponsor/3/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/3/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/laradock/sponsor/4/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/4/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/laradock/sponsor/5/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/5/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/laradock/sponsor/6/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/6/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/laradock/sponsor/7/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/7/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/laradock/sponsor/8/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/8/avatar.svg"></a>
|
|
||||||
<a href="https://opencollective.com/laradock/sponsor/9/website" target="_blank"><img src="https://opencollective.com/laradock/sponsor/9/avatar.svg"></a>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -172,7 +268,6 @@ Most importantly Docker can run on Development and on Production (same environme
|
|||||||
|
|
||||||
What's better than a **Demo Video**:
|
What's better than a **Demo Video**:
|
||||||
|
|
||||||
- Laradock v5.* (should be next!)
|
|
||||||
- Laradock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
|
- Laradock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y)
|
||||||
- Laradock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA)
|
- Laradock [v2.*](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)
|
||||||
@ -201,14 +296,14 @@ You are welcome to join our chat room on Gitter.
|
|||||||
> Help keeping the project development going, by [contributing](http://laradock.io/contributing) or donating a little.
|
> Help keeping the project development going, by [contributing](http://laradock.io/contributing) or donating a little.
|
||||||
> Thanks in advance.
|
> Thanks in advance.
|
||||||
|
|
||||||
Donate directly via [Paypal](https://www.paypal.me/mzalt)
|
Donate directly via [Paypal](https://paypal.me/mzmmzz)
|
||||||
|
|
||||||
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/mzalt)
|
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/mzmmzz)
|
||||||
|
|
||||||
or become a backer on [Open Collective](https://opencollective.com/laradock#backer)
|
|
||||||
|
|
||||||
<a href="https://opencollective.com/laradock#backers" target="_blank"><img src="https://opencollective.com/laradock/backers.svg?width=890"></a>
|
|
||||||
|
|
||||||
or show your support via [Beerpay](https://beerpay.io/laradock/laradock)
|
or show your support via [Beerpay](https://beerpay.io/laradock/laradock)
|
||||||
|
|
||||||
[![Beerpay](https://beerpay.io/laradock/laradock/badge.svg?style=flat)](https://beerpay.io/laradock/laradock)
|
[![Beerpay](https://beerpay.io/laradock/laradock/badge.svg?style=flat)](https://beerpay.io/laradock/laradock)
|
||||||
|
|
||||||
|
or become a backer on [Open Collective](https://opencollective.com/laradock#backer)
|
||||||
|
|
||||||
|
<a href="https://opencollective.com/laradock#backers" target="_blank"><img src="https://opencollective.com/laradock/backers.svg?width=890"></a>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: License
|
title: 8. License
|
||||||
type: index
|
type: index
|
||||||
weight: 8
|
weight: 8
|
||||||
---
|
---
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
title: Related Projects
|
title: 6. Related Projects
|
||||||
type: index
|
type: index
|
||||||
weight: 6
|
weight: 6
|
||||||
---
|
---
|
||||||
|
1
DOCUMENTATION/static/ads.txt
Normal file
1
DOCUMENTATION/static/ads.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
google.com, pub-9826129398689742, DIRECT, f08c47fec0942fa0
|
13
DOCUMENTATION/static/custom-style.css
Normal file
13
DOCUMENTATION/static/custom-style.css
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
/* Custom CSS */
|
||||||
|
|
||||||
|
.article a {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
.project .logo {
|
||||||
|
width: 200px;
|
||||||
|
padding-right: 0;
|
||||||
|
}
|
||||||
|
.project .banner {
|
||||||
|
height: 70px;
|
||||||
|
padding: 25px;
|
||||||
|
}
|
@ -5,7 +5,7 @@
|
|||||||
<div class="logo">
|
<div class="logo">
|
||||||
<img src="{{ $.Site.BaseURL }}{{ . }}">
|
<img src="{{ $.Site.BaseURL }}{{ . }}">
|
||||||
</div>
|
</div>
|
||||||
Laradock
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<!--<div class="name">-->
|
<!--<div class="name">-->
|
||||||
<!--<strong>{{ .Site.Title }} {{ with .Site.Params.version }}<span class="version">{{ . }}</span>{{ end }}</strong>-->
|
<!--<strong>{{ .Site.Title }} {{ with .Site.Params.version }}<span class="version">{{ . }}</span>{{ end }}</strong>-->
|
||||||
|
0
aws/.gitignore → aws-eb-cli/.gitignore
vendored
0
aws/.gitignore → aws-eb-cli/.gitignore
vendored
5
cassandra/Dockerfile
Normal file
5
cassandra/Dockerfile
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
ARG CASSANDRA_VERSION=latest
|
||||||
|
FROM bitnami/cassandra:${CASSANDRA_VERSION}
|
||||||
|
|
||||||
|
LABEL maintainer="Stefan Neuhaus <https://www.github.com/stefnats>"
|
||||||
|
|
@ -45,6 +45,8 @@ volumes:
|
|||||||
driver: ${VOLUMES_DRIVER}
|
driver: ${VOLUMES_DRIVER}
|
||||||
sonarqube:
|
sonarqube:
|
||||||
driver: ${VOLUMES_DRIVER}
|
driver: ${VOLUMES_DRIVER}
|
||||||
|
cassandra:
|
||||||
|
driver: ${VOLUMES_DRIVER}
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
@ -67,6 +69,7 @@ services:
|
|||||||
- INSTALL_IMAP=${WORKSPACE_INSTALL_IMAP}
|
- INSTALL_IMAP=${WORKSPACE_INSTALL_IMAP}
|
||||||
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
|
- INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO}
|
||||||
- INSTALL_AMQP=${WORKSPACE_INSTALL_AMQP}
|
- INSTALL_AMQP=${WORKSPACE_INSTALL_AMQP}
|
||||||
|
- INSTALL_CASSANDRA=${WORKSPACE_INSTALL_CASSANDRA}
|
||||||
- INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS}
|
- INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS}
|
||||||
- INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL}
|
- INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL}
|
||||||
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
||||||
@ -153,6 +156,7 @@ services:
|
|||||||
- INSTALL_IMAP=${PHP_FPM_INSTALL_IMAP}
|
- INSTALL_IMAP=${PHP_FPM_INSTALL_IMAP}
|
||||||
- INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
|
- INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO}
|
||||||
- INSTALL_AMQP=${PHP_FPM_INSTALL_AMQP}
|
- INSTALL_AMQP=${PHP_FPM_INSTALL_AMQP}
|
||||||
|
- INSTALL_CASSANDRA=${PHP_FPM_INSTALL_CASSANDRA}
|
||||||
- INSTALL_MSSQL=${PHP_FPM_INSTALL_MSSQL}
|
- INSTALL_MSSQL=${PHP_FPM_INSTALL_MSSQL}
|
||||||
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
|
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
|
||||||
- INSTALL_GMP=${PHP_FPM_INSTALL_GMP}
|
- INSTALL_GMP=${PHP_FPM_INSTALL_GMP}
|
||||||
@ -185,6 +189,7 @@ services:
|
|||||||
- INSTALL_SSHPASS=${PHP_FPM_INSTALL_SSHPASS}
|
- INSTALL_SSHPASS=${PHP_FPM_INSTALL_SSHPASS}
|
||||||
- ADDITIONAL_LOCALES=${PHP_FPM_ADDITIONAL_LOCALES}
|
- ADDITIONAL_LOCALES=${PHP_FPM_ADDITIONAL_LOCALES}
|
||||||
- INSTALL_FFMPEG=${PHP_FPM_FFMPEG}
|
- INSTALL_FFMPEG=${PHP_FPM_FFMPEG}
|
||||||
|
- INSTALL_XHPROF=${PHP_FPM_INSTALL_XHPROF}
|
||||||
- http_proxy
|
- http_proxy
|
||||||
- https_proxy
|
- https_proxy
|
||||||
- no_proxy
|
- no_proxy
|
||||||
@ -220,6 +225,7 @@ services:
|
|||||||
- INSTALL_ZIP_ARCHIVE=${PHP_WORKER_INSTALL_ZIP_ARCHIVE}
|
- INSTALL_ZIP_ARCHIVE=${PHP_WORKER_INSTALL_ZIP_ARCHIVE}
|
||||||
- INSTALL_MYSQL_CLIENT=${PHP_WORKER_INSTALL_MYSQL_CLIENT}
|
- INSTALL_MYSQL_CLIENT=${PHP_WORKER_INSTALL_MYSQL_CLIENT}
|
||||||
- INSTALL_AMQP=${PHP_WORKER_INSTALL_AMQP}
|
- INSTALL_AMQP=${PHP_WORKER_INSTALL_AMQP}
|
||||||
|
- INSTALL_CASSANDRA=${PHP_WORKER_INSTALL_CASSANDRA}
|
||||||
- INSTALL_GHOSTSCRIPT=${PHP_WORKER_INSTALL_GHOSTSCRIPT}
|
- INSTALL_GHOSTSCRIPT=${PHP_WORKER_INSTALL_GHOSTSCRIPT}
|
||||||
- INSTALL_SWOOLE=${PHP_WORKER_INSTALL_SWOOLE}
|
- INSTALL_SWOOLE=${PHP_WORKER_INSTALL_SWOOLE}
|
||||||
- INSTALL_TAINT=${PHP_WORKER_INSTALL_TAINT}
|
- INSTALL_TAINT=${PHP_WORKER_INSTALL_TAINT}
|
||||||
@ -245,6 +251,8 @@ services:
|
|||||||
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
|
- INSTALL_PGSQL=${PHP_FPM_INSTALL_PGSQL}
|
||||||
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
|
- INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH}
|
||||||
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
|
- INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED}
|
||||||
|
- INSTALL_SOCKETS=${LARAVEL_HORIZON_INSTALL_SOCKETS}
|
||||||
|
- INSTALL_CASSANDRA=${PHP_FPM_INSTALL_CASSANDRA}
|
||||||
volumes:
|
volumes:
|
||||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
|
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
|
||||||
- ./laravel-horizon/supervisord.d:/etc/supervisord.d
|
- ./laravel-horizon/supervisord.d:/etc/supervisord.d
|
||||||
@ -401,12 +409,14 @@ services:
|
|||||||
- http_proxy
|
- http_proxy
|
||||||
- https_proxy
|
- https_proxy
|
||||||
- no_proxy
|
- no_proxy
|
||||||
|
- MARIADB_VERSION=${MARIADB_VERSION}
|
||||||
volumes:
|
volumes:
|
||||||
- ${DATA_PATH_HOST}/mariadb:/var/lib/mysql
|
- ${DATA_PATH_HOST}/mariadb:/var/lib/mysql
|
||||||
- ${MARIADB_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
- ${MARIADB_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
||||||
ports:
|
ports:
|
||||||
- "${MARIADB_PORT}:3306"
|
- "${MARIADB_PORT}:3306"
|
||||||
environment:
|
environment:
|
||||||
|
- TZ=${WORKSPACE_TIMEZONE}
|
||||||
- MYSQL_DATABASE=${MARIADB_DATABASE}
|
- MYSQL_DATABASE=${MARIADB_DATABASE}
|
||||||
- MYSQL_USER=${MARIADB_USER}
|
- MYSQL_USER=${MARIADB_USER}
|
||||||
- MYSQL_PASSWORD=${MARIADB_PASSWORD}
|
- MYSQL_PASSWORD=${MARIADB_PASSWORD}
|
||||||
@ -581,6 +591,38 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
|
### Cassandra ############################################
|
||||||
|
cassandra:
|
||||||
|
build: ./cassandra
|
||||||
|
ports:
|
||||||
|
- "${CASSANDRA_TRANSPORT_PORT_NUMBER}:7000"
|
||||||
|
- "${CASSANDRA_JMX_PORT_NUMBER}:7199"
|
||||||
|
- "${CASSANDRA_CQL_PORT_NUMBER}:9042"
|
||||||
|
privileged: true
|
||||||
|
environment:
|
||||||
|
- CASSANDRA_VERSION=${CASSANDRA_VERSION}
|
||||||
|
- CASSANDRA_TRANSPORT_PORT_NUMBER=${CASSANDRA_TRANSPORT_PORT_NUMBER}
|
||||||
|
- CASSANDRA_JMX_PORT_NUMBER=${CASSANDRA_JMX_PORT_NUMBER}
|
||||||
|
- CASSANDRA_CQL_PORT_NUMBER=${CASSANDRA_CQL_PORT_NUMBER}
|
||||||
|
- CASSANDRA_USER=${CASSANDRA_USER}
|
||||||
|
- CASSANDRA_PASSWORD_SEEDER=${CASSANDRA_PASSWORD_SEEDER}
|
||||||
|
- CASSANDRA_PASSWORD=${CASSANDRA_PASSWORD}
|
||||||
|
- CASSANDRA_NUM_TOKENS=${CASSANDRA_NUM_TOKENS}
|
||||||
|
- CASSANDRA_HOST=${CASSANDRA_HOST}
|
||||||
|
- CASSANDRA_CLUSTER_NAME=${CASSANDRA_CLUSTER_NAME}
|
||||||
|
- CASSANDRA_SEEDS=${CASSANDRA_SEEDS}
|
||||||
|
- CASSANDRA_ENDPOINT_SNITCH=${CASSANDRA_ENDPOINT_SNITCH}
|
||||||
|
- CASSANDRA_ENABLE_RPC=${CASSANDRA_ENABLE_RPC}
|
||||||
|
- CASSANDRA_DATACENTER=${CASSANDRA_DATACENTER}
|
||||||
|
- CASSANDRA_RACK=${CASSANDRA_RACK}
|
||||||
|
hostname: laradock-cassandra
|
||||||
|
volumes:
|
||||||
|
- ${DATA_PATH_HOST}/cassandra:/var/lib/cassandra
|
||||||
|
depends_on:
|
||||||
|
- php-fpm
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Beanstalkd Console ###################################
|
### Beanstalkd Console ###################################
|
||||||
beanstalkd-console:
|
beanstalkd-console:
|
||||||
build: ./beanstalkd-console
|
build: ./beanstalkd-console
|
||||||
@ -661,8 +703,10 @@ services:
|
|||||||
- elasticsearch:/usr/share/elasticsearch/data
|
- elasticsearch:/usr/share/elasticsearch/data
|
||||||
environment:
|
environment:
|
||||||
- cluster.name=laradock-cluster
|
- cluster.name=laradock-cluster
|
||||||
|
- node.name=laradock-node
|
||||||
- bootstrap.memory_lock=true
|
- bootstrap.memory_lock=true
|
||||||
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
|
||||||
|
- cluster.initial_master_nodes=laradock-node
|
||||||
ulimits:
|
ulimits:
|
||||||
memlock:
|
memlock:
|
||||||
soft: -1
|
soft: -1
|
||||||
@ -821,6 +865,36 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
|
### Graylog #######################################
|
||||||
|
graylog:
|
||||||
|
build: ./graylog
|
||||||
|
environment:
|
||||||
|
- GRAYLOG_PASSWORD_SECRET=${GRAYLOG_PASSWORD}
|
||||||
|
- GRAYLOG_ROOT_PASSWORD_SHA2=${GRAYLOG_SHA256_PASSWORD}
|
||||||
|
- GRAYLOG_HTTP_EXTERNAL_URI=http://127.0.0.1:${GRAYLOG_PORT}/
|
||||||
|
links:
|
||||||
|
- mongo
|
||||||
|
- elasticsearch
|
||||||
|
depends_on:
|
||||||
|
- mongo
|
||||||
|
- elasticsearch
|
||||||
|
ports:
|
||||||
|
# Graylog web interface and REST API
|
||||||
|
- ${GRAYLOG_PORT}:9000
|
||||||
|
# Syslog TCP
|
||||||
|
- ${GRAYLOG_SYSLOG_TCP_PORT}:514
|
||||||
|
# Syslog UDP
|
||||||
|
- ${GRAYLOG_SYSLOG_UDP_PORT}:514/udp
|
||||||
|
# GELF TCP
|
||||||
|
- ${GRAYLOG_GELF_TCP_PORT}:12201
|
||||||
|
# GELF UDP
|
||||||
|
- ${GRAYLOG_GELF_UDP_PORT}:12201/udp
|
||||||
|
user: root
|
||||||
|
volumes:
|
||||||
|
- ./graylog/config:/usr/share/graylog/data/config
|
||||||
|
networks:
|
||||||
|
- backend
|
||||||
|
|
||||||
### Laravel Echo Server #######################################
|
### Laravel Echo Server #######################################
|
||||||
laravel-echo-server:
|
laravel-echo-server:
|
||||||
build:
|
build:
|
||||||
@ -969,7 +1043,7 @@ services:
|
|||||||
### AWS EB-CLI ################################################
|
### AWS EB-CLI ################################################
|
||||||
aws:
|
aws:
|
||||||
build:
|
build:
|
||||||
context: ./aws
|
context: ./aws-eb-cli
|
||||||
volumes:
|
volumes:
|
||||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
|
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
|
||||||
depends_on:
|
depends_on:
|
||||||
@ -1461,7 +1535,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "${MANTICORE_API_PORT}:9312"
|
- "${MANTICORE_API_PORT}:9312"
|
||||||
- "${MANTICORE_SPHINXQL_PORT}:9306"
|
- "${MANTICORE_SPHINXQL_PORT}:9306"
|
||||||
- "${MANTICORE_HTTP_PORT}:9308"
|
- "${MANTICORE_HTTP_PORT}:9308"
|
||||||
networks:
|
networks:
|
||||||
- backend
|
- backend
|
||||||
|
|
||||||
@ -1515,4 +1589,5 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ${DATA_PATH_HOST}/tomcat/webapps:/usr/local/tomcat/webapps
|
- ${DATA_PATH_HOST}/tomcat/webapps:/usr/local/tomcat/webapps
|
||||||
- ${DATA_PATH_HOST}/tomcat/logs:/usr/local/tomcat/logs
|
- ${DATA_PATH_HOST}/tomcat/logs:/usr/local/tomcat/logs
|
||||||
# restart: always
|
# restart: always
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
FROM docker.elastic.co/elasticsearch/elasticsearch:6.6.0
|
FROM docker.elastic.co/elasticsearch/elasticsearch:7.1.1
|
||||||
|
|
||||||
EXPOSE 9200 9300
|
EXPOSE 9200 9300
|
||||||
|
62
env-example
62
env-example
@ -38,7 +38,7 @@ COMPOSE_PROJECT_NAME=laradock
|
|||||||
### PHP Version ###########################################
|
### PHP Version ###########################################
|
||||||
|
|
||||||
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.3 - 7.2 - 7.1 - 7.0 - 5.6
|
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.3 - 7.2 - 7.1 - 7.0 - 5.6
|
||||||
PHP_VERSION=7.2
|
PHP_VERSION=7.3
|
||||||
|
|
||||||
### Phalcon Version ###########################################
|
### Phalcon Version ###########################################
|
||||||
|
|
||||||
@ -106,6 +106,7 @@ WORKSPACE_INSTALL_XSL=false
|
|||||||
WORKSPACE_INSTALL_IMAP=false
|
WORKSPACE_INSTALL_IMAP=false
|
||||||
WORKSPACE_INSTALL_MONGO=false
|
WORKSPACE_INSTALL_MONGO=false
|
||||||
WORKSPACE_INSTALL_AMQP=false
|
WORKSPACE_INSTALL_AMQP=false
|
||||||
|
WORKSPACE_INSTALL_CASSANDRA=false
|
||||||
WORKSPACE_INSTALL_MSSQL=false
|
WORKSPACE_INSTALL_MSSQL=false
|
||||||
WORKSPACE_INSTALL_DRUSH=false
|
WORKSPACE_INSTALL_DRUSH=false
|
||||||
WORKSPACE_DRUSH_VERSION=8.1.17
|
WORKSPACE_DRUSH_VERSION=8.1.17
|
||||||
@ -161,6 +162,7 @@ PHP_FPM_INSTALL_PHPDBG=false
|
|||||||
PHP_FPM_INSTALL_IMAP=false
|
PHP_FPM_INSTALL_IMAP=false
|
||||||
PHP_FPM_INSTALL_MONGO=false
|
PHP_FPM_INSTALL_MONGO=false
|
||||||
PHP_FPM_INSTALL_AMQP=false
|
PHP_FPM_INSTALL_AMQP=false
|
||||||
|
PHP_FPM_INSTALL_CASSANDRA=false
|
||||||
PHP_FPM_INSTALL_MSSQL=false
|
PHP_FPM_INSTALL_MSSQL=false
|
||||||
PHP_FPM_INSTALL_SSH2=false
|
PHP_FPM_INSTALL_SSH2=false
|
||||||
PHP_FPM_INSTALL_SOAP=false
|
PHP_FPM_INSTALL_SOAP=false
|
||||||
@ -205,6 +207,7 @@ PHP_WORKER_INSTALL_SWOOLE=false
|
|||||||
PHP_WORKER_INSTALL_TAINT=false
|
PHP_WORKER_INSTALL_TAINT=false
|
||||||
PHP_WORKER_INSTALL_FFMPEG=false
|
PHP_WORKER_INSTALL_FFMPEG=false
|
||||||
PHP_WORKER_INSTALL_GMP=false
|
PHP_WORKER_INSTALL_GMP=false
|
||||||
|
PHP_WORKER_INSTALL_CASSANDRA=false
|
||||||
|
|
||||||
PHP_WORKER_PUID=1000
|
PHP_WORKER_PUID=1000
|
||||||
PHP_WORKER_PGID=1000
|
PHP_WORKER_PGID=1000
|
||||||
@ -219,6 +222,10 @@ NGINX_PHP_UPSTREAM_CONTAINER=php-fpm
|
|||||||
NGINX_PHP_UPSTREAM_PORT=9000
|
NGINX_PHP_UPSTREAM_PORT=9000
|
||||||
NGINX_SSL_PATH=./nginx/ssl/
|
NGINX_SSL_PATH=./nginx/ssl/
|
||||||
|
|
||||||
|
### LARAVEL_HORIZON ################################################
|
||||||
|
|
||||||
|
LARAVEL_HORIZON_INSTALL_SOCKETS=false
|
||||||
|
|
||||||
### APACHE ################################################
|
### APACHE ################################################
|
||||||
|
|
||||||
APACHE_HOST_HTTP_PORT=80
|
APACHE_HOST_HTTP_PORT=80
|
||||||
@ -269,6 +276,7 @@ MSSQL_PORT=1433
|
|||||||
|
|
||||||
### MARIADB ###############################################
|
### MARIADB ###############################################
|
||||||
|
|
||||||
|
MARIADB_VERSION=latest
|
||||||
MARIADB_DATABASE=default
|
MARIADB_DATABASE=default
|
||||||
MARIADB_USER=default
|
MARIADB_USER=default
|
||||||
MARIADB_PASSWORD=secret
|
MARIADB_PASSWORD=secret
|
||||||
@ -387,6 +395,18 @@ CONFLUENCE_HOST_HTTP_PORT=8090
|
|||||||
|
|
||||||
GRAFANA_PORT=3000
|
GRAFANA_PORT=3000
|
||||||
|
|
||||||
|
### GRAYLOG ###############################################
|
||||||
|
|
||||||
|
# password must be 16 characters long
|
||||||
|
GRAYLOG_PASSWORD=somesupersecretpassword
|
||||||
|
# sha256 representation of the password
|
||||||
|
GRAYLOG_SHA256_PASSWORD=b1cb6e31e172577918c9e7806c572b5ed8477d3f57aa737bee4b5b1db3696f09
|
||||||
|
GRAYLOG_PORT=9000
|
||||||
|
GRAYLOG_SYSLOG_TCP_PORT=514
|
||||||
|
GRAYLOG_SYSLOG_UDP_PORT=514
|
||||||
|
GRAYLOG_GELF_TCP_PORT=12201
|
||||||
|
GRAYLOG_GELF_UDP_PORT=12201
|
||||||
|
|
||||||
### BLACKFIRE #############################################
|
### BLACKFIRE #############################################
|
||||||
|
|
||||||
# Create an account on blackfire.io. Don't enable blackfire and xDebug at the same time. # visit https://blackfire.io/docs/24-days/06-installation#install-probe-debian for more info.
|
# Create an account on blackfire.io. Don't enable blackfire and xDebug at the same time. # visit https://blackfire.io/docs/24-days/06-installation#install-probe-debian for more info.
|
||||||
@ -704,12 +724,12 @@ PGADMIN_DEFAULT_EMAIL=pgadmin4@pgadmin.org
|
|||||||
PGADMIN_DEFAULT_PASSWORD=admin
|
PGADMIN_DEFAULT_PASSWORD=admin
|
||||||
|
|
||||||
### SONARQUBE ################################################
|
### SONARQUBE ################################################
|
||||||
## docker-compose up -d sonarqube
|
## docker-compose up -d sonarqube
|
||||||
## (If you encounter a database error)
|
## (If you encounter a database error)
|
||||||
## docker-compose exec --user=root postgres
|
## docker-compose exec --user=root postgres
|
||||||
## source docker-entrypoint-initdb.d/init_sonarqube_db.sh
|
## source docker-entrypoint-initdb.d/init_sonarqube_db.sh
|
||||||
## (If you encounter logs error)
|
## (If you encounter logs error)
|
||||||
## docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
|
## docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
|
||||||
|
|
||||||
SONARQUBE_HOSTNAME=sonar.example.com
|
SONARQUBE_HOSTNAME=sonar.example.com
|
||||||
SONARQUBE_PORT=9000
|
SONARQUBE_PORT=9000
|
||||||
@ -722,3 +742,37 @@ SONARQUBE_POSTGRES_PASSWORD=sonarPass
|
|||||||
### TOMCAT ################################################
|
### TOMCAT ################################################
|
||||||
TOMCAT_VERSION=8.5.43
|
TOMCAT_VERSION=8.5.43
|
||||||
TOMCAT_HOST_HTTP_PORT=8080
|
TOMCAT_HOST_HTTP_PORT=8080
|
||||||
|
|
||||||
|
### CASSANDRA ################################################
|
||||||
|
|
||||||
|
# Cassandra Version, supported tags can be found at https://hub.docker.com/r/bitnami/cassandra/
|
||||||
|
CASSANDRA_VERSION=latest
|
||||||
|
# Inter-node cluster communication port. Default: 7000
|
||||||
|
CASSANDRA_TRANSPORT_PORT_NUMBER=7000
|
||||||
|
# JMX connections port. Default: 7199
|
||||||
|
CASSANDRA_JMX_PORT_NUMBER=7199
|
||||||
|
# Client port. Default: 9042.
|
||||||
|
CASSANDRA_CQL_PORT_NUMBER=9042
|
||||||
|
# Cassandra user name. Defaults: cassandra
|
||||||
|
CASSANDRA_USER=cassandra
|
||||||
|
# Password seeder will change the Cassandra default credentials at initialization. In clusters, only one node should be marked as password seeder. Default: no
|
||||||
|
CASSANDRA_PASSWORD_SEEDER=no
|
||||||
|
# Cassandra user password. Default: cassandra
|
||||||
|
CASSANDRA_PASSWORD=cassandra
|
||||||
|
# Number of tokens for the node. Default: 256.
|
||||||
|
CASSANDRA_NUM_TOKENS=256
|
||||||
|
# Hostname used to configure Cassandra. It can be either an IP or a domain. If left empty, it will be resolved to the machine IP.
|
||||||
|
CASSANDRA_HOST=
|
||||||
|
# Cluster name to configure Cassandra.. Defaults: My Cluster
|
||||||
|
CASSANDRA_CLUSTER_NAME="My Cluster"
|
||||||
|
# : Hosts that will act as Cassandra seeds. No defaults.
|
||||||
|
CASSANDRA_SEEDS=
|
||||||
|
# Snitch name (which determines which data centers and racks nodes belong to). Default SimpleSnitch
|
||||||
|
CASSANDRA_ENDPOINT_SNITCH=SimpleSnitch
|
||||||
|
# Enable the thrift RPC endpoint. Default :true
|
||||||
|
CASSANDRA_ENABLE_RPC=true
|
||||||
|
# Datacenter name for the cluster. Ignored in SimpleSnitch endpoint snitch. Default: dc1.
|
||||||
|
CASSANDRA_DATACENTER=dc1
|
||||||
|
# Rack name for the cluster. Ignored in SimpleSnitch endpoint snitch. Default: rack1.
|
||||||
|
CASSANDRA_RACK=rack1
|
||||||
|
|
||||||
|
3
graylog/Dockerfile
Normal file
3
graylog/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
FROM graylog/graylog:3.0
|
||||||
|
|
||||||
|
EXPOSE 9000
|
481
graylog/config/graylog.conf
Normal file
481
graylog/config/graylog.conf
Normal file
@ -0,0 +1,481 @@
|
|||||||
|
############################
|
||||||
|
# GRAYLOG CONFIGURATION FILE
|
||||||
|
############################
|
||||||
|
#
|
||||||
|
# This is the Graylog configuration file. The file has to use ISO 8859-1/Latin-1 character encoding.
|
||||||
|
# Characters that cannot be directly represented in this encoding can be written using Unicode escapes
|
||||||
|
# as defined in https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.3, using the \u prefix.
|
||||||
|
# For example, \u002c.
|
||||||
|
#
|
||||||
|
# * Entries are generally expected to be a single line of the form, one of the following:
|
||||||
|
#
|
||||||
|
# propertyName=propertyValue
|
||||||
|
# propertyName:propertyValue
|
||||||
|
#
|
||||||
|
# * White space that appears between the property name and property value is ignored,
|
||||||
|
# so the following are equivalent:
|
||||||
|
#
|
||||||
|
# name=Stephen
|
||||||
|
# name = Stephen
|
||||||
|
#
|
||||||
|
# * White space at the beginning of the line is also ignored.
|
||||||
|
#
|
||||||
|
# * Lines that start with the comment characters ! or # are ignored. Blank lines are also ignored.
|
||||||
|
#
|
||||||
|
# * The property value is generally terminated by the end of the line. White space following the
|
||||||
|
# property value is not ignored, and is treated as part of the property value.
|
||||||
|
#
|
||||||
|
# * A property value can span several lines if each line is terminated by a backslash (‘\’) character.
|
||||||
|
# For example:
|
||||||
|
#
|
||||||
|
# targetCities=\
|
||||||
|
# Detroit,\
|
||||||
|
# Chicago,\
|
||||||
|
# Los Angeles
|
||||||
|
#
|
||||||
|
# This is equivalent to targetCities=Detroit,Chicago,Los Angeles (white space at the beginning of lines is ignored).
|
||||||
|
#
|
||||||
|
# * The characters newline, carriage return, and tab can be inserted with characters \n, \r, and \t, respectively.
|
||||||
|
#
|
||||||
|
# * The backslash character must be escaped as a double backslash. For example:
|
||||||
|
#
|
||||||
|
# path=c:\\docs\\doc1
|
||||||
|
#
|
||||||
|
|
||||||
|
# If you are running more than one instances of Graylog server you have to select one of these
|
||||||
|
# instances as master. The master will perform some periodical tasks that non-masters won't perform.
|
||||||
|
is_master = true
|
||||||
|
|
||||||
|
# The auto-generated node ID will be stored in this file and read after restarts. It is a good idea
|
||||||
|
# to use an absolute file path here if you are starting Graylog server from init scripts or similar.
|
||||||
|
node_id_file = /usr/share/graylog/data/config/node-id
|
||||||
|
|
||||||
|
# You MUST set a secret to secure/pepper the stored user passwords here. Use at least 64 characters.
|
||||||
|
# Generate one by using for example: pwgen -N 1 -s 96
|
||||||
|
password_secret = replacethiswithyourownsecret!
|
||||||
|
|
||||||
|
# The default root user is named 'admin'
|
||||||
|
#root_username = admin
|
||||||
|
|
||||||
|
# You MUST specify a hash password for the root user (which you only need to initially set up the
|
||||||
|
# system and in case you lose connectivity to your authentication backend)
|
||||||
|
# This password cannot be changed using the API or via the web interface. If you need to change it,
|
||||||
|
# modify it in this file.
|
||||||
|
# Create one by using for example: echo -n yourpassword | shasum -a 256
|
||||||
|
# and put the resulting hash value into the following line
|
||||||
|
|
||||||
|
# Default password: admin
|
||||||
|
# CHANGE THIS!
|
||||||
|
root_password_sha2 = 8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918
|
||||||
|
|
||||||
|
# The email address of the root user.
|
||||||
|
# Default is empty
|
||||||
|
#root_email = ""
|
||||||
|
|
||||||
|
# The time zone setting of the root user. See http://www.joda.org/joda-time/timezones.html for a list of valid time zones.
|
||||||
|
# Default is UTC
|
||||||
|
#root_timezone = UTC
|
||||||
|
|
||||||
|
# Set plugin directory here (relative or absolute)
|
||||||
|
plugin_dir = /usr/share/graylog/plugin
|
||||||
|
|
||||||
|
###############
|
||||||
|
# HTTP settings
|
||||||
|
###############
|
||||||
|
|
||||||
|
#### HTTP bind address
|
||||||
|
#
|
||||||
|
# The network interface used by the Graylog HTTP interface.
|
||||||
|
#
|
||||||
|
# This network interface must be accessible by all Graylog nodes in the cluster and by all clients
|
||||||
|
# using the Graylog web interface.
|
||||||
|
#
|
||||||
|
# If the port is omitted, Graylog will use port 9000 by default.
|
||||||
|
#
|
||||||
|
# Default: 127.0.0.1:9000
|
||||||
|
#http_bind_address = 127.0.0.1:9000
|
||||||
|
#http_bind_address = [2001:db8::1]:9000
|
||||||
|
http_bind_address = 0.0.0.0:9000
|
||||||
|
|
||||||
|
#### HTTP publish URI
|
||||||
|
#
|
||||||
|
# The HTTP URI of this Graylog node which is used to communicate with the other Graylog nodes in the cluster and by all
|
||||||
|
# clients using the Graylog web interface.
|
||||||
|
#
|
||||||
|
# The URI will be published in the cluster discovery APIs, so that other Graylog nodes will be able to find and connect to this Graylog node.
|
||||||
|
#
|
||||||
|
# This configuration setting has to be used if this Graylog node is available on another network interface than $http_bind_address,
|
||||||
|
# for example if the machine has multiple network interfaces or is behind a NAT gateway.
|
||||||
|
#
|
||||||
|
# If $http_bind_address contains a wildcard IPv4 address (0.0.0.0), the first non-loopback IPv4 address of this machine will be used.
|
||||||
|
# This configuration setting *must not* contain a wildcard address!
|
||||||
|
#
|
||||||
|
# Default: http://$http_bind_address/
|
||||||
|
#http_publish_uri = http://192.168.1.1:9000/
|
||||||
|
|
||||||
|
#### External Graylog URI
|
||||||
|
#
|
||||||
|
# The public URI of Graylog which will be used by the Graylog web interface to communicate with the Graylog REST API.
|
||||||
|
#
|
||||||
|
# The external Graylog URI usually has to be specified, if Graylog is running behind a reverse proxy or load-balancer
|
||||||
|
# and it will be used to generate URLs addressing entities in the Graylog REST API (see $http_bind_address).
|
||||||
|
#
|
||||||
|
# When using Graylog Collector, this URI will be used to receive heartbeat messages and must be accessible for all collectors.
|
||||||
|
#
|
||||||
|
# This setting can be overriden on a per-request basis with the "X-Graylog-Server-URL" HTTP request header.
|
||||||
|
#
|
||||||
|
# Default: $http_publish_uri
|
||||||
|
#http_external_uri =
|
||||||
|
|
||||||
|
#### Enable CORS headers for HTTP interface
|
||||||
|
#
|
||||||
|
# This is necessary for JS-clients accessing the server directly.
|
||||||
|
# If these are disabled, modern browsers will not be able to retrieve resources from the server.
|
||||||
|
# This is enabled by default. Uncomment the next line to disable it.
|
||||||
|
#http_enable_cors = false
|
||||||
|
|
||||||
|
#### Enable GZIP support for HTTP interface
|
||||||
|
#
|
||||||
|
# This compresses API responses and therefore helps to reduce
|
||||||
|
# overall round trip times. This is enabled by default. Uncomment the next line to disable it.
|
||||||
|
#http_enable_gzip = false
|
||||||
|
|
||||||
|
# The maximum size of the HTTP request headers in bytes.
|
||||||
|
#http_max_header_size = 8192
|
||||||
|
|
||||||
|
# The size of the thread pool used exclusively for serving the HTTP interface.
|
||||||
|
#http_thread_pool_size = 16
|
||||||
|
|
||||||
|
################
|
||||||
|
# HTTPS settings
|
||||||
|
################
|
||||||
|
|
||||||
|
#### Enable HTTPS support for the HTTP interface
|
||||||
|
#
|
||||||
|
# This secures the communication with the HTTP interface with TLS to prevent request forgery and eavesdropping.
|
||||||
|
#
|
||||||
|
# Default: false
|
||||||
|
#http_enable_tls = true
|
||||||
|
|
||||||
|
# The X.509 certificate chain file in PEM format to use for securing the HTTP interface.
|
||||||
|
#http_tls_cert_file = /path/to/graylog.crt
|
||||||
|
|
||||||
|
# The PKCS#8 private key file in PEM format to use for securing the HTTP interface.
|
||||||
|
#http_tls_key_file = /path/to/graylog.key
|
||||||
|
|
||||||
|
# The password to unlock the private key used for securing the HTTP interface.
|
||||||
|
#http_tls_key_password = secret
|
||||||
|
|
||||||
|
|
||||||
|
# Comma separated list of trusted proxies that are allowed to set the client address with X-Forwarded-For
|
||||||
|
# header. May be subnets, or hosts.
|
||||||
|
#trusted_proxies = 127.0.0.1/32, 0:0:0:0:0:0:0:1/128
|
||||||
|
|
||||||
|
# List of Elasticsearch hosts Graylog should connect to.
|
||||||
|
# Need to be specified as a comma-separated list of valid URIs for the http ports of your elasticsearch nodes.
|
||||||
|
# If one or more of your elasticsearch hosts require authentication, include the credentials in each node URI that
|
||||||
|
# requires authentication.
|
||||||
|
#
|
||||||
|
# Default: http://127.0.0.1:9200
|
||||||
|
elasticsearch_hosts = http://elasticsearch:9200
|
||||||
|
|
||||||
|
# Maximum amount of time to wait for successfull connection to Elasticsearch HTTP port.
|
||||||
|
#
|
||||||
|
# Default: 10 Seconds
|
||||||
|
#elasticsearch_connect_timeout = 10s
|
||||||
|
|
||||||
|
# Maximum amount of time to wait for reading back a response from an Elasticsearch server.
|
||||||
|
#
|
||||||
|
# Default: 60 seconds
|
||||||
|
#elasticsearch_socket_timeout = 60s
|
||||||
|
|
||||||
|
# Maximum idle time for an Elasticsearch connection. If this is exceeded, this connection will
|
||||||
|
# be tore down.
|
||||||
|
#
|
||||||
|
# Default: inf
|
||||||
|
#elasticsearch_idle_timeout = -1s
|
||||||
|
|
||||||
|
# Maximum number of total connections to Elasticsearch.
|
||||||
|
#
|
||||||
|
# Default: 20
|
||||||
|
#elasticsearch_max_total_connections = 20
|
||||||
|
|
||||||
|
# Maximum number of total connections per Elasticsearch route (normally this means per
|
||||||
|
# elasticsearch server).
|
||||||
|
#
|
||||||
|
# Default: 2
|
||||||
|
#elasticsearch_max_total_connections_per_route = 2
|
||||||
|
|
||||||
|
# Maximum number of times Graylog will retry failed requests to Elasticsearch.
|
||||||
|
#
|
||||||
|
# Default: 2
|
||||||
|
#elasticsearch_max_retries = 2
|
||||||
|
|
||||||
|
# Enable automatic Elasticsearch node discovery through Nodes Info,
|
||||||
|
# see https://www.elastic.co/guide/en/elasticsearch/reference/5.4/cluster-nodes-info.html
|
||||||
|
#
|
||||||
|
# WARNING: Automatic node discovery does not work if Elasticsearch requires authentication, e. g. with Shield.
|
||||||
|
#
|
||||||
|
# Default: false
|
||||||
|
#elasticsearch_discovery_enabled = true
|
||||||
|
|
||||||
|
# Filter for including/excluding Elasticsearch nodes in discovery according to their custom attributes,
|
||||||
|
# see https://www.elastic.co/guide/en/elasticsearch/reference/5.4/cluster.html#cluster-nodes
|
||||||
|
#
|
||||||
|
# Default: empty
|
||||||
|
#elasticsearch_discovery_filter = rack:42
|
||||||
|
|
||||||
|
# Frequency of the Elasticsearch node discovery.
|
||||||
|
#
|
||||||
|
# Default: 30s
|
||||||
|
# elasticsearch_discovery_frequency = 30s
|
||||||
|
|
||||||
|
# Enable payload compression for Elasticsearch requests.
|
||||||
|
#
|
||||||
|
# Default: false
|
||||||
|
#elasticsearch_compression_enabled = true
|
||||||
|
|
||||||
|
# Disable checking the version of Elasticsearch for being compatible with this Graylog release.
|
||||||
|
# WARNING: Using Graylog with unsupported and untested versions of Elasticsearch may lead to data loss!
|
||||||
|
#elasticsearch_disable_version_check = true
|
||||||
|
|
||||||
|
# Disable message retention on this node, i. e. disable Elasticsearch index rotation.
|
||||||
|
#no_retention = false
|
||||||
|
|
||||||
|
# Do you want to allow searches with leading wildcards? This can be extremely resource hungry and should only
|
||||||
|
# be enabled with care. See also: http://docs.graylog.org/en/2.1/pages/queries.html
|
||||||
|
allow_leading_wildcard_searches = false
|
||||||
|
|
||||||
|
# Do you want to allow searches to be highlighted? Depending on the size of your messages this can be memory hungry and
|
||||||
|
# should only be enabled after making sure your Elasticsearch cluster has enough memory.
|
||||||
|
allow_highlighting = false
|
||||||
|
|
||||||
|
# Global request timeout for Elasticsearch requests (e. g. during search, index creation, or index time-range
|
||||||
|
# calculations) based on a best-effort to restrict the runtime of Elasticsearch operations.
|
||||||
|
# Default: 1m
|
||||||
|
#elasticsearch_request_timeout = 1m
|
||||||
|
|
||||||
|
# Global timeout for index optimization (force merge) requests.
|
||||||
|
# Default: 1h
|
||||||
|
#elasticsearch_index_optimization_timeout = 1h
|
||||||
|
|
||||||
|
# Maximum number of concurrently running index optimization (force merge) jobs.
|
||||||
|
# If you are using lots of different index sets, you might want to increase that number.
|
||||||
|
# Default: 20
|
||||||
|
#elasticsearch_index_optimization_jobs = 20
|
||||||
|
|
||||||
|
# Time interval for index range information cleanups. This setting defines how often stale index range information
|
||||||
|
# is being purged from the database.
|
||||||
|
# Default: 1h
|
||||||
|
#index_ranges_cleanup_interval = 1h
|
||||||
|
|
||||||
|
# Batch size for the Elasticsearch output. This is the maximum (!) number of messages the Elasticsearch output
|
||||||
|
# module will get at once and write to Elasticsearch in a batch call. If the configured batch size has not been
|
||||||
|
# reached within output_flush_interval seconds, everything that is available will be flushed at once. Remember
|
||||||
|
# that every outputbuffer processor manages its own batch and performs its own batch write calls.
|
||||||
|
# ("outputbuffer_processors" variable)
|
||||||
|
output_batch_size = 500
|
||||||
|
|
||||||
|
# Flush interval (in seconds) for the Elasticsearch output. This is the maximum amount of time between two
|
||||||
|
# batches of messages written to Elasticsearch. It is only effective at all if your minimum number of messages
|
||||||
|
# for this time period is less than output_batch_size * outputbuffer_processors.
|
||||||
|
output_flush_interval = 1
|
||||||
|
|
||||||
|
# As stream outputs are loaded only on demand, an output which is failing to initialize will be tried over and
|
||||||
|
# over again. To prevent this, the following configuration options define after how many faults an output will
|
||||||
|
# not be tried again for an also configurable amount of seconds.
|
||||||
|
output_fault_count_threshold = 5
|
||||||
|
output_fault_penalty_seconds = 30
|
||||||
|
|
||||||
|
# The number of parallel running processors.
|
||||||
|
# Raise this number if your buffers are filling up.
|
||||||
|
processbuffer_processors = 5
|
||||||
|
outputbuffer_processors = 3
|
||||||
|
|
||||||
|
# The following settings (outputbuffer_processor_*) configure the thread pools backing each output buffer processor.
|
||||||
|
# See https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.html for technical details
|
||||||
|
|
||||||
|
# When the number of threads is greater than the core (see outputbuffer_processor_threads_core_pool_size),
|
||||||
|
# this is the maximum time in milliseconds that excess idle threads will wait for new tasks before terminating.
|
||||||
|
# Default: 5000
|
||||||
|
#outputbuffer_processor_keep_alive_time = 5000
|
||||||
|
|
||||||
|
# The number of threads to keep in the pool, even if they are idle, unless allowCoreThreadTimeOut is set
|
||||||
|
# Default: 3
|
||||||
|
#outputbuffer_processor_threads_core_pool_size = 3
|
||||||
|
|
||||||
|
# The maximum number of threads to allow in the pool
|
||||||
|
# Default: 30
|
||||||
|
#outputbuffer_processor_threads_max_pool_size = 30
|
||||||
|
|
||||||
|
# UDP receive buffer size for all message inputs (e. g. SyslogUDPInput).
|
||||||
|
#udp_recvbuffer_sizes = 1048576
|
||||||
|
|
||||||
|
# Wait strategy describing how buffer processors wait on a cursor sequence. (default: sleeping)
|
||||||
|
# Possible types:
|
||||||
|
# - yielding
|
||||||
|
# Compromise between performance and CPU usage.
|
||||||
|
# - sleeping
|
||||||
|
# Compromise between performance and CPU usage. Latency spikes can occur after quiet periods.
|
||||||
|
# - blocking
|
||||||
|
# High throughput, low latency, higher CPU usage.
|
||||||
|
# - busy_spinning
|
||||||
|
# Avoids syscalls which could introduce latency jitter. Best when threads can be bound to specific CPU cores.
|
||||||
|
processor_wait_strategy = blocking
|
||||||
|
|
||||||
|
# Size of internal ring buffers. Raise this if raising outputbuffer_processors does not help anymore.
|
||||||
|
# For optimum performance your LogMessage objects in the ring buffer should fit in your CPU L3 cache.
|
||||||
|
# Must be a power of 2. (512, 1024, 2048, ...)
|
||||||
|
ring_size = 65536
|
||||||
|
|
||||||
|
inputbuffer_ring_size = 65536
|
||||||
|
inputbuffer_processors = 2
|
||||||
|
inputbuffer_wait_strategy = blocking
|
||||||
|
|
||||||
|
# Enable the disk based message journal.
|
||||||
|
message_journal_enabled = true
|
||||||
|
|
||||||
|
# The directory which will be used to store the message journal. The directory must me exclusively used by Graylog and
|
||||||
|
# must not contain any other files than the ones created by Graylog itself.
|
||||||
|
#
|
||||||
|
# ATTENTION:
|
||||||
|
# If you create a seperate partition for the journal files and use a file system creating directories like 'lost+found'
|
||||||
|
# in the root directory, you need to create a sub directory for your journal.
|
||||||
|
# Otherwise Graylog will log an error message that the journal is corrupt and Graylog will not start.
|
||||||
|
message_journal_dir = /usr/share/graylog/data/journal
|
||||||
|
|
||||||
|
# Journal hold messages before they could be written to Elasticsearch.
|
||||||
|
# For a maximum of 12 hours or 5 GB whichever happens first.
|
||||||
|
# During normal operation the journal will be smaller.
|
||||||
|
#message_journal_max_age = 12h
|
||||||
|
#message_journal_max_size = 5gb
|
||||||
|
|
||||||
|
#message_journal_flush_age = 1m
|
||||||
|
#message_journal_flush_interval = 1000000
|
||||||
|
#message_journal_segment_age = 1h
|
||||||
|
#message_journal_segment_size = 100mb
|
||||||
|
|
||||||
|
# Number of threads used exclusively for dispatching internal events. Default is 2.
|
||||||
|
#async_eventbus_processors = 2
|
||||||
|
|
||||||
|
# How many seconds to wait between marking node as DEAD for possible load balancers and starting the actual
|
||||||
|
# shutdown process. Set to 0 if you have no status checking load balancers in front.
|
||||||
|
lb_recognition_period_seconds = 3
|
||||||
|
|
||||||
|
# Journal usage percentage that triggers requesting throttling for this server node from load balancers. The feature is
|
||||||
|
# disabled if not set.
|
||||||
|
#lb_throttle_threshold_percentage = 95
|
||||||
|
|
||||||
|
# Every message is matched against the configured streams and it can happen that a stream contains rules which
|
||||||
|
# take an unusual amount of time to run, for example if its using regular expressions that perform excessive backtracking.
|
||||||
|
# This will impact the processing of the entire server. To keep such misbehaving stream rules from impacting other
|
||||||
|
# streams, Graylog limits the execution time for each stream.
|
||||||
|
# The default values are noted below, the timeout is in milliseconds.
|
||||||
|
# If the stream matching for one stream took longer than the timeout value, and this happened more than "max_faults" times
|
||||||
|
# that stream is disabled and a notification is shown in the web interface.
|
||||||
|
#stream_processing_timeout = 2000
|
||||||
|
#stream_processing_max_faults = 3
|
||||||
|
|
||||||
|
# Length of the interval in seconds in which the alert conditions for all streams should be checked
|
||||||
|
# and alarms are being sent.
|
||||||
|
#alert_check_interval = 60
|
||||||
|
|
||||||
|
# Since 0.21 the Graylog server supports pluggable output modules. This means a single message can be written to multiple
|
||||||
|
# outputs. The next setting defines the timeout for a single output module, including the default output module where all
|
||||||
|
# messages end up.
|
||||||
|
#
|
||||||
|
# Time in milliseconds to wait for all message outputs to finish writing a single message.
|
||||||
|
#output_module_timeout = 10000
|
||||||
|
|
||||||
|
# Time in milliseconds after which a detected stale master node is being rechecked on startup.
|
||||||
|
#stale_master_timeout = 2000
|
||||||
|
|
||||||
|
# Time in milliseconds which Graylog is waiting for all threads to stop on shutdown.
|
||||||
|
#shutdown_timeout = 30000
|
||||||
|
|
||||||
|
# MongoDB connection string
|
||||||
|
# See https://docs.mongodb.com/manual/reference/connection-string/ for details
|
||||||
|
mongodb_uri = mongodb://mongo/graylog
|
||||||
|
|
||||||
|
# Authenticate against the MongoDB server
|
||||||
|
#mongodb_uri = mongodb://grayloguser:secret@mongo:27017/graylog
|
||||||
|
|
||||||
|
# Use a replica set instead of a single host
|
||||||
|
#mongodb_uri = mongodb://grayloguser:secret@mongo:27017,mongo:27018,mongo:27019/graylog
|
||||||
|
|
||||||
|
# Increase this value according to the maximum connections your MongoDB server can handle from a single client
|
||||||
|
# if you encounter MongoDB connection problems.
|
||||||
|
mongodb_max_connections = 100
|
||||||
|
|
||||||
|
# Number of threads allowed to be blocked by MongoDB connections multiplier. Default: 5
|
||||||
|
# If mongodb_max_connections is 100, and mongodb_threads_allowed_to_block_multiplier is 5,
|
||||||
|
# then 500 threads can block. More than that and an exception will be thrown.
|
||||||
|
# http://api.mongodb.com/java/current/com/mongodb/MongoOptions.html#threadsAllowedToBlockForConnectionMultiplier
|
||||||
|
mongodb_threads_allowed_to_block_multiplier = 5
|
||||||
|
|
||||||
|
# Drools Rule File (Use to rewrite incoming log messages)
|
||||||
|
# See: http://docs.graylog.org/en/2.1/pages/drools.html
|
||||||
|
#rules_file = /etc/graylog/server/rules.drl
|
||||||
|
|
||||||
|
# Email transport
|
||||||
|
#transport_email_enabled = false
|
||||||
|
#transport_email_hostname = mail.example.com
|
||||||
|
#transport_email_port = 587
|
||||||
|
#transport_email_use_auth = true
|
||||||
|
#transport_email_use_tls = true
|
||||||
|
#transport_email_use_ssl = true
|
||||||
|
#transport_email_auth_username = you@example.com
|
||||||
|
#transport_email_auth_password = secret
|
||||||
|
#transport_email_subject_prefix = [graylog]
|
||||||
|
#transport_email_from_email = graylog@example.com
|
||||||
|
|
||||||
|
# Specify and uncomment this if you want to include links to the stream in your stream alert mails.
|
||||||
|
# This should define the fully qualified base url to your web interface exactly the same way as it is accessed by your users.
|
||||||
|
#transport_email_web_interface_url = https://graylog.example.com
|
||||||
|
|
||||||
|
# The default connect timeout for outgoing HTTP connections.
|
||||||
|
# Values must be a positive duration (and between 1 and 2147483647 when converted to milliseconds).
|
||||||
|
# Default: 5s
|
||||||
|
#http_connect_timeout = 5s
|
||||||
|
|
||||||
|
# The default read timeout for outgoing HTTP connections.
|
||||||
|
# Values must be a positive duration (and between 1 and 2147483647 when converted to milliseconds).
|
||||||
|
# Default: 10s
|
||||||
|
#http_read_timeout = 10s
|
||||||
|
|
||||||
|
# The default write timeout for outgoing HTTP connections.
|
||||||
|
# Values must be a positive duration (and between 1 and 2147483647 when converted to milliseconds).
|
||||||
|
# Default: 10s
|
||||||
|
#http_write_timeout = 10s
|
||||||
|
|
||||||
|
# HTTP proxy for outgoing HTTP connections
|
||||||
|
#http_proxy_uri =
|
||||||
|
|
||||||
|
# The threshold of the garbage collection runs. If GC runs take longer than this threshold, a system notification
|
||||||
|
# will be generated to warn the administrator about possible problems with the system. Default is 1 second.
|
||||||
|
#gc_warning_threshold = 1s
|
||||||
|
|
||||||
|
# Connection timeout for a configured LDAP server (e. g. ActiveDirectory) in milliseconds.
|
||||||
|
#ldap_connection_timeout = 2000
|
||||||
|
|
||||||
|
# Disable the use of SIGAR for collecting system stats
|
||||||
|
#disable_sigar = false
|
||||||
|
|
||||||
|
# The default cache time for dashboard widgets. (Default: 10 seconds, minimum: 1 second)
|
||||||
|
#dashboard_widget_default_cache_time = 10s
|
||||||
|
|
||||||
|
# Automatically load content packs in "content_packs_dir" on the first start of Graylog.
|
||||||
|
content_packs_loader_enabled = true
|
||||||
|
|
||||||
|
# The directory which contains content packs which should be loaded on the first start of Graylog.
|
||||||
|
content_packs_dir = /usr/share/graylog/data/contentpacks
|
||||||
|
|
||||||
|
# A comma-separated list of content packs (files in "content_packs_dir") which should be applied on
|
||||||
|
# the first start of Graylog.
|
||||||
|
# Default: empty
|
||||||
|
content_packs_auto_load = grok-patterns.json
|
||||||
|
|
||||||
|
# For some cluster-related REST requests, the node must query all other nodes in the cluster. This is the maximum number
|
||||||
|
# of threads available for this. Increase it, if '/cluster/*' requests take long to complete.
|
||||||
|
# Should be http_thread_pool_size * average_cluster_size if you have a high number of concurrent users.
|
||||||
|
proxied_requests_thread_pool_size = 32
|
35
graylog/config/log4j2.xml
Normal file
35
graylog/config/log4j2.xml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Configuration packages="org.graylog2.log4j" shutdownHook="disable">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="STDOUT" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d %-5p: %c - %m%n"/>
|
||||||
|
</Console>
|
||||||
|
|
||||||
|
<!-- Internal Graylog log appender. Please do not disable. This makes internal log messages available via REST calls. -->
|
||||||
|
<Memory name="graylog-internal-logs" bufferSize="500"/>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<!-- Application Loggers -->
|
||||||
|
<Logger name="org.graylog2" level="info"/>
|
||||||
|
<Logger name="com.github.joschi.jadconfig" level="warn"/>
|
||||||
|
<!-- this emits a harmless warning for ActiveDirectory every time which we can't work around :( -->
|
||||||
|
<Logger name="org.apache.directory.api.ldap.model.message.BindRequestImpl" level="error"/>
|
||||||
|
<!-- Prevent DEBUG message about Lucene Expressions not found. -->
|
||||||
|
<Logger name="org.elasticsearch.script" level="warn"/>
|
||||||
|
<!-- Disable messages from the version check -->
|
||||||
|
<Logger name="org.graylog2.periodical.VersionCheckThread" level="off"/>
|
||||||
|
<!-- Suppress crazy byte array dump of Drools -->
|
||||||
|
<Logger name="org.drools.compiler.kie.builder.impl.KieRepositoryImpl" level="warn"/>
|
||||||
|
<!-- Silence chatty natty -->
|
||||||
|
<Logger name="com.joestelmach.natty.Parser" level="warn"/>
|
||||||
|
<!-- Silence Kafka log chatter -->
|
||||||
|
<Logger name="kafka.log.Log" level="warn"/>
|
||||||
|
<Logger name="kafka.log.OffsetIndex" level="warn"/>
|
||||||
|
<!-- Silence useless session validation messages -->
|
||||||
|
<Logger name="org.apache.shiro.session.mgt.AbstractValidatingSessionManager" level="warn"/>
|
||||||
|
<Root level="warn">
|
||||||
|
<AppenderRef ref="STDOUT"/>
|
||||||
|
<AppenderRef ref="graylog-internal-logs"/>
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
@ -24,7 +24,7 @@ RUN apk --update add wget \
|
|||||||
procps
|
procps
|
||||||
|
|
||||||
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
|
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
|
||||||
RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached
|
RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 mongodb && docker-php-ext-enable memcached mongodb
|
||||||
|
|
||||||
#Install BCMath package:
|
#Install BCMath package:
|
||||||
ARG INSTALL_BCMATH=false
|
ARG INSTALL_BCMATH=false
|
||||||
@ -32,6 +32,12 @@ RUN if [ ${INSTALL_BCMATH} = true ]; then \
|
|||||||
docker-php-ext-install bcmath \
|
docker-php-ext-install bcmath \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
#Install Sockets package:
|
||||||
|
ARG INSTALL_SOCKETS=false
|
||||||
|
RUN if [ ${INSTALL_SOCKETS} = true ]; then \
|
||||||
|
docker-php-ext-install sockets \
|
||||||
|
;fi
|
||||||
|
|
||||||
# Install PostgreSQL drivers:
|
# Install PostgreSQL drivers:
|
||||||
ARG INSTALL_PGSQL=false
|
ARG INSTALL_PGSQL=false
|
||||||
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
||||||
@ -39,6 +45,28 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \
|
|||||||
&& docker-php-ext-install pdo_pgsql \
|
&& docker-php-ext-install pdo_pgsql \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
# Install Cassandra drivers:
|
||||||
|
ARG INSTALL_CASSANDRA=false
|
||||||
|
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
|
||||||
|
apk --update add cassandra-cpp-driver \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
WORKDIR /usr/src
|
||||||
|
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
|
||||||
|
git clone https://github.com/datastax/php-driver.git \
|
||||||
|
&& cd php-driver/ext \
|
||||||
|
&& phpize \
|
||||||
|
&& mkdir -p /usr/src/php-driver/build \
|
||||||
|
&& cd /usr/src/php-driver/build \
|
||||||
|
&& ../ext/configure > /dev/null \
|
||||||
|
&& make clean >/dev/null \
|
||||||
|
&& make >/dev/null 2>&1 \
|
||||||
|
&& make install \
|
||||||
|
&& docker-php-ext-enable cassandra \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# PHP Memcached:
|
# PHP Memcached:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
@ -1,7 +1,15 @@
|
|||||||
FROM mariadb:latest
|
ARG MARIADB_VERSION=latest
|
||||||
|
FROM mariadb:${MARIADB_VERSION}
|
||||||
|
|
||||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# Set Timezone
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
ARG TZ=UTC
|
||||||
|
ENV TZ ${TZ}
|
||||||
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && chown -R mysql:root /var/lib/mysql/
|
||||||
COPY my.cnf /etc/mysql/conf.d/my.cnf
|
COPY my.cnf /etc/mysql/conf.d/my.cnf
|
||||||
|
|
||||||
CMD ["mysqld"]
|
CMD ["mysqld"]
|
||||||
|
@ -14,8 +14,7 @@
|
|||||||
|
|
||||||
ARG LARADOCK_PHP_VERSION
|
ARG LARADOCK_PHP_VERSION
|
||||||
|
|
||||||
# FROM laradock/php-fpm:2.2-${LARADOCK_PHP_VERSION}
|
FROM laradock/php-fpm:2.5-${LARADOCK_PHP_VERSION}
|
||||||
FROM letsdockerize/laradock-php-fpm:2.4-${LARADOCK_PHP_VERSION}
|
|
||||||
|
|
||||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||||
|
|
||||||
@ -263,7 +262,7 @@ ARG INSTALL_XHPROF=false
|
|||||||
RUN if [ ${INSTALL_XHPROF} = true ]; then \
|
RUN if [ ${INSTALL_XHPROF} = true ]; then \
|
||||||
# Install the php xhprof extension
|
# Install the php xhprof extension
|
||||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = 7 ]; then \
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = 7 ]; then \
|
||||||
curl -L -o /tmp/xhprof.tar.gz "https://github.com/tideways/php-xhprof-extension/archive/v4.1.6.tar.gz"; \
|
curl -L -o /tmp/xhprof.tar.gz "https://github.com/tideways/php-xhprof-extension/archive/v4.1.7.tar.gz"; \
|
||||||
else \
|
else \
|
||||||
curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \
|
curl -L -o /tmp/xhprof.tar.gz "https://codeload.github.com/phacility/xhprof/tar.gz/master"; \
|
||||||
fi \
|
fi \
|
||||||
@ -282,6 +281,10 @@ RUN if [ ${INSTALL_XHPROF} = true ]; then \
|
|||||||
|
|
||||||
COPY ./xhprof.ini /usr/local/etc/php/conf.d
|
COPY ./xhprof.ini /usr/local/etc/php/conf.d
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_XHPROF} = false ]; then \
|
||||||
|
rm /usr/local/etc/php/conf.d/xhprof.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# AMQP:
|
# AMQP:
|
||||||
###########################################################################
|
###########################################################################
|
||||||
@ -353,7 +356,7 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
|
|||||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||||
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/2.2.0.tar.gz"; \
|
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/2.2.0.tar.gz"; \
|
||||||
else \
|
else \
|
||||||
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz"; \
|
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/master.tar.gz"; \
|
||||||
fi \
|
fi \
|
||||||
&& mkdir -p memcached \
|
&& mkdir -p memcached \
|
||||||
&& tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \
|
&& tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \
|
||||||
@ -573,7 +576,6 @@ ARG INSTALL_IMAP=false
|
|||||||
|
|
||||||
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
RUN if [ ${INSTALL_IMAP} = true ]; then \
|
||||||
apt-get install -y libc-client-dev libkrb5-dev && \
|
apt-get install -y libc-client-dev libkrb5-dev && \
|
||||||
rm -r /var/lib/apt/lists/* && \
|
|
||||||
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
|
docker-php-ext-configure imap --with-kerberos --with-imap-ssl && \
|
||||||
docker-php-ext-install imap \
|
docker-php-ext-install imap \
|
||||||
;fi
|
;fi
|
||||||
|
@ -24,7 +24,7 @@ RUN apk --update add wget \
|
|||||||
supervisor
|
supervisor
|
||||||
|
|
||||||
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
|
RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl
|
||||||
RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached
|
RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 mongodb && docker-php-ext-enable memcached mongodb
|
||||||
|
|
||||||
# Add a non-root user:
|
# Add a non-root user:
|
||||||
ARG PUID=1000
|
ARG PUID=1000
|
||||||
@ -85,6 +85,26 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \
|
|||||||
docker-php-ext-install sockets \
|
docker-php-ext-install sockets \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
# Install Cassandra drivers:
|
||||||
|
ARG INSTALL_CASSANDRA=false
|
||||||
|
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
|
||||||
|
apk --update add cassandra-cpp-driver \
|
||||||
|
;fi
|
||||||
|
|
||||||
|
WORKDIR /usr/src
|
||||||
|
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
|
||||||
|
git clone https://github.com/datastax/php-driver.git \
|
||||||
|
&& cd php-driver/ext \
|
||||||
|
&& phpize \
|
||||||
|
&& mkdir -p /usr/src/php-driver/build \
|
||||||
|
&& cd /usr/src/php-driver/build \
|
||||||
|
&& ../ext/configure --with-php-config=/usr/bin/php-config7.1 > /dev/null \
|
||||||
|
&& make clean >/dev/null \
|
||||||
|
&& make >/dev/null 2>&1 \
|
||||||
|
&& make install \
|
||||||
|
&& docker-php-ext-enable cassandra \
|
||||||
|
;fi
|
||||||
|
|
||||||
# Install Phalcon ext
|
# Install Phalcon ext
|
||||||
ARG INSTALL_PHALCON=false
|
ARG INSTALL_PHALCON=false
|
||||||
ARG PHALCON_VERSION
|
ARG PHALCON_VERSION
|
||||||
|
@ -14,8 +14,7 @@
|
|||||||
|
|
||||||
ARG LARADOCK_PHP_VERSION
|
ARG LARADOCK_PHP_VERSION
|
||||||
|
|
||||||
# FROM laradock/workspace:2.2-${LARADOCK_PHP_VERSION}
|
FROM laradock/workspace:2.5-${LARADOCK_PHP_VERSION}
|
||||||
FROM letsdockerize/laradock-workspace:2.4-${LARADOCK_PHP_VERSION}
|
|
||||||
|
|
||||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||||
|
|
||||||
@ -314,8 +313,7 @@ ARG INSTALL_XDEBUG=false
|
|||||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||||
# Load the xdebug extension only with phpunit commands
|
# Load the xdebug extension only with phpunit commands
|
||||||
apt-get install -y php${LARADOCK_PHP_VERSION}-xdebug && \
|
apt-get install -y php${LARADOCK_PHP_VERSION}-xdebug && \
|
||||||
sed -i 's/^;//g' /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-xdebug.ini && \
|
sed -i 's/^;//g' /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-xdebug.ini \
|
||||||
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
|
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
# ADD for REMOTE debugging
|
# ADD for REMOTE debugging
|
||||||
@ -407,6 +405,37 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \
|
|||||||
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/amqp.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-amqp.ini \
|
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/amqp.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-amqp.ini \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# CASSANDRA:
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
ARG INSTALL_CASSANDRA=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_CASSANDRA} = true ]; then \
|
||||||
|
apt-get install libgmp-dev -y && \
|
||||||
|
curl https://downloads.datastax.com/cpp-driver/ubuntu/18.04/dependencies/libuv/v1.28.0/libuv1-dev_1.28.0-1_amd64.deb -o libuv1-dev.deb && \
|
||||||
|
curl https://downloads.datastax.com/cpp-driver/ubuntu/18.04/dependencies/libuv/v1.28.0/libuv1_1.28.0-1_amd64.deb -o libuv1.deb && \
|
||||||
|
curl https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.12.0/cassandra-cpp-driver-dev_2.12.0-1_amd64.deb -o cassandra-cpp-driver-dev.deb && \
|
||||||
|
curl https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.12.0/cassandra-cpp-driver_2.12.0-1_amd64.deb -o cassandra-cpp-driver.deb && \
|
||||||
|
dpkg -i libuv1.deb && \
|
||||||
|
dpkg -i libuv1-dev.deb && \
|
||||||
|
dpkg -i cassandra-cpp-driver.deb && \
|
||||||
|
dpkg -i cassandra-cpp-driver-dev.deb && \
|
||||||
|
rm libuv1.deb libuv1-dev.deb cassandra-cpp-driver-dev.deb cassandra-cpp-driver.deb && \
|
||||||
|
cd /usr/src && \
|
||||||
|
git clone https://github.com/datastax/php-driver.git && \
|
||||||
|
cd /usr/src/php-driver/ext && \
|
||||||
|
phpize && \
|
||||||
|
mkdir /usr/src/php-driver/build && \
|
||||||
|
cd /usr/src/php-driver/build && \
|
||||||
|
../ext/configure > /dev/null && \
|
||||||
|
make clean >/dev/null && \
|
||||||
|
make >/dev/null 2>&1 && \
|
||||||
|
make install && \
|
||||||
|
echo "extension=cassandra.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/cassandra.ini && \
|
||||||
|
ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/cassandra.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-cassandra.ini \
|
||||||
|
;fi
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
# PHP REDIS EXTENSION
|
# PHP REDIS EXTENSION
|
||||||
###########################################################################
|
###########################################################################
|
||||||
@ -414,6 +443,7 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \
|
|||||||
ARG INSTALL_PHPREDIS=false
|
ARG INSTALL_PHPREDIS=false
|
||||||
|
|
||||||
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
RUN if [ ${INSTALL_PHPREDIS} = true ]; then \
|
||||||
|
apt-get update -yqq && \
|
||||||
apt-get install -yqq php-redis \
|
apt-get install -yqq php-redis \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
@ -7,4 +7,4 @@ VOLUME /datalog
|
|||||||
|
|
||||||
EXPOSE 2181
|
EXPOSE 2181
|
||||||
|
|
||||||
CMD ["zookeeper"]
|
CMD ["zkServer.sh", "start-foreground"]
|
||||||
|
Loading…
Reference in New Issue
Block a user