diff --git a/.devcontainer/devcontainer.example.json b/.devcontainer/devcontainer.example.json new file mode 100644 index 00000000..4be22f7f --- /dev/null +++ b/.devcontainer/devcontainer.example.json @@ -0,0 +1,9 @@ +{ + "name": "Laradock", + "dockerComposeFile": ["../docker-compose.yml"], + "runServices": ["nginx", "postgres", "pgadmin"], + "service": "workspace", + "workspaceFolder": "/var/www", + "shutdownAction": "stopCompose", + "postCreateCommand": "uname -a" +} diff --git a/.github/README.md b/.github/README.md deleted file mode 100644 index 6b79353d..00000000 --- a/.github/README.md +++ /dev/null @@ -1,98 +0,0 @@ -

- Laradock Logo -

- -

PHP development environment that runs on Docker

- -

- Build status - GitHub stars - GitHub forks - GitHub issues - GitHub license - contributions welcome -

- -

Use Docker First - Then Learn About It Later

- -

- forthebadge -

- - ---- - -

- - Laradock Documentation - -

- -## Sponsors - -

- - - Writing essays service Edubirdie - -

- - - - - - - - - - - -For basic sponsorships go to [Open Collective](https://opencollective.com/laradock#sponsor), for golden sponsorships contact support@laradock.io. - -*Your logo will show up on the [github repository](https://github.com/laradock/laradock/) index page and the [documentation](http://laradock.io/) main page.* - -## People - -#### Maintainers: -- [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) -- [Philippe Trépanier](https://github.com/philtrep) @philtrep -- [Mike Erickson](https://github.com/mikeerickson) @mikeerickson -- [Dwi Fahni Denni](https://github.com/zeroc0d3) @zeroc0d3 -- [Thor Erik](https://github.com/thorerik) @thorerik -- [Winfried van Loon](https://github.com/winfried-van-loon) @winfried-van-loon -- [TJ Miller](https://github.com/sixlive) @sixlive -- [Yu-Lung Shao (Allen)](https://github.com/bestlong) @bestlong -- [Milan Urukalo](https://github.com/urukalo) @urukalo -- [Vince Chu](https://github.com/vwchu) @vwchu -- [Huadong Zuo](https://github.com/zuohuadong) @zuohuadong -- [Lan Phan](https://github.com/lanphan) @lanphan -- [Ahkui](https://github.com/ahkui) @ahkui -- Join us. - -#### Awesome Contributors: - - - - -## Donations - -> Help keeping the project development going, by [contributing](http://laradock.io/contributing) or donating a little. -> Thanks in advance. - -Donate directly via [Paypal](https://paypal.me/mzmmzz) - -[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/mzmmzz) - -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) - -or become a backer on [Open Collective](https://opencollective.com/laradock#backer) - - - - -## License - -[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE) diff --git a/.github/home-page-images/join-us.png b/.github/home-page-images/join-us.png new file mode 100644 index 00000000..c97f75f9 Binary files /dev/null and b/.github/home-page-images/join-us.png differ diff --git a/.github/home-page-images/sponsor-1.png b/.github/home-page-images/sponsor-1.png deleted file mode 100644 index fc9bbd94..00000000 Binary files a/.github/home-page-images/sponsor-1.png and /dev/null differ diff --git a/.gitignore b/.gitignore index 06732062..06eccb52 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,7 @@ /nginx/ssl/*.key /nginx/ssl/*.csr -.DS_Store \ No newline at end of file +/.devcontainer/* +!/.devcontainer/devcontainer.example.json + +.DS_Store diff --git a/.travis.yml b/.travis.yml index 8773aa32..821b0f62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,26 +12,29 @@ env: - PHP_VERSION=7.1 BUILD_SERVICE=workspace - PHP_VERSION=7.2 BUILD_SERVICE=workspace - PHP_VERSION=7.3 BUILD_SERVICE=workspace + - PHP_VERSION=7.4 BUILD_SERVICE=workspace - PHP_VERSION=5.6 BUILD_SERVICE=php-fpm - PHP_VERSION=7.0 BUILD_SERVICE=php-fpm - PHP_VERSION=7.1 BUILD_SERVICE=php-fpm - PHP_VERSION=7.2 BUILD_SERVICE=php-fpm - PHP_VERSION=7.3 BUILD_SERVICE=php-fpm + - PHP_VERSION=7.4 BUILD_SERVICE=php-fpm - PHP_VERSION=hhvm BUILD_SERVICE=hhvm # - PHP_VERSION=5.6 BUILD_SERVICE=php-worker - - PHP_VERSION=7.0 BUILD_SERVICE=php-worker - - PHP_VERSION=7.1 BUILD_SERVICE=php-worker - - PHP_VERSION=7.2 BUILD_SERVICE=php-worker - - PHP_VERSION=7.3 BUILD_SERVICE=php-worker + - PHP_VERSION=7.0 BUILD_SERVICE="php-worker laravel-horizon" + - PHP_VERSION=7.1 BUILD_SERVICE="php-worker laravel-horizon" + - PHP_VERSION=7.2 BUILD_SERVICE="php-worker laravel-horizon" + - PHP_VERSION=7.3 BUILD_SERVICE="php-worker laravel-horizon" + - PHP_VERSION=7.4 BUILD_SERVICE="php-worker laravel-horizon" - PHP_VERSION=NA BUILD_SERVICE=solr - 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 cassandra" - 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 gearman" - PHP_VERSION=NA BUILD_SERVICE="kibana grafana laravel-echo-server" - PHP_VERSION=NA BUILD_SERVICE="ipython-controller manticore" # - PHP_VERSION=NA BUILD_SERVICE="aws" diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index d83b4422..399db68e 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -76,7 +76,7 @@ docker-compose exec mysql bash *Example: enter to MySQL prompt within MySQL container* ```bash -docker-compose exec mysql mysql -u homestead -psecret +docker-compose exec mysql mysql -udefault -psecret ``` 3 - To exit a container, type `exit`. @@ -536,7 +536,7 @@ Note: Should add `--user=laradock` (example `docker-compose exec --user=laradock php artisan ``` ```bash -Composer update +composer update ``` ```bash phpunit @@ -650,7 +650,7 @@ docker-compose up -d metabase 1) Boot the container `docker-compose up -d jenkins`. To enter the container type `docker-compose exec jenkins bash`. -2) Go to `http://localhost:8090/` (if you didn't chanhed your default port mapping) +2) Go to `http://localhost:8090/` (if you didn't change your default port mapping) 3) Authenticate from the web app. @@ -1044,6 +1044,7 @@ _Note: You can customize the port on which beanstalkd console is listening by ch
+ ## Use Confluence 1 - Run the Confluence Container (`confluence`) with the `docker-compose up` command. Example: @@ -1054,10 +1055,19 @@ docker-compose up -d confluence 2 - Open your browser and visit the localhost on port **8090**: `http://localhost:8090` -**Note:** You can you trial version and then you have to buy a licence to use it. +**Note:** Confluence is a licensed application - an evaluation licence can be obtained from Atlassian. You can set custom confluence version in `CONFLUENCE_VERSION`. [Find more info in section 'Versioning'](https://hub.docker.com/r/atlassian/confluence-server/) + +##### Confluence usage with Nginx and SSL. + +1. Find an instance configuration file in `nginx/sites/confluence.conf.example` and replace sample domain with yours. + +2. Configure ssl keys to your domain. + +Keep in mind that Confluence is still accessible on 8090 anyway. +
## Use ElasticSearch @@ -1575,7 +1585,7 @@ The default username and password for the root MySQL user are `root` and `root ` 1 - Enter the MySQL container: `docker-compose exec mysql bash`. -2 - Enter mysql: `mysql -uroot -proot` for non root access use `mysql -uhomestead -psecret`. +2 - Enter mysql: `mysql -uroot -proot` for non root access use `mysql -udefault -psecret`. 3 - See all users: `SELECT User FROM mysql.user;` @@ -1865,6 +1875,27 @@ To install GNU Parallel in the Workspace container +
+ +## Install Supervisor + +Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems. + +(see http://supervisord.org/index.html) + +To install Supervisor in the Workspace container + +1 - Open the `.env` file + +2 - Set `WORKSPACE_INSTALL_SUPERVISOR` and `WORKSPACE_INSTALL_PYTHON` to `true`. + +3 - Re-build the container `docker-compose build workspace` Or `docker-composer up --build -d workspace` + + + + + +

@@ -1973,6 +2004,26 @@ YAML PHP extension allows you to easily parse and create YAML structured data. I 4 - Re-build the container `docker-compose build php-fpm`
+ + +
+ +## Install AST PHP extension +AST exposes the abstract syntax tree generated by PHP 7+. This extension is required by tools such as `Phan`, a static analyzer for PHP. + +1 - Open the `.env` file + +2 - Search for the `WORKSPACE_INSTALL_AST` argument under the Workspace Container + +3 - Set it to `true` + +4 - Re-build the container `docker-compose build workspace` + +**Note** If you need a specific version of AST then search for the `WORKSPACE_AST_VERSION` argument under the Workspace Container and set it to the desired version and continue step 4. + + + +
## PHPStorm Debugging Guide diff --git a/DOCUMENTATION/content/guides/index.md b/DOCUMENTATION/content/guides/index.md index 451c0027..ab8c9c7e 100644 --- a/DOCUMENTATION/content/guides/index.md +++ b/DOCUMENTATION/content/guides/index.md @@ -70,6 +70,16 @@ 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 ``` +### Prepare for Visual Studio Code remote development + +If you want to use Visual Studio Code for [remote development](https://code.visualstudio.com/docs/remote/containers) directly on your `workspace` container, copy file `devcontainer.example.json` to `devcontainer.json` and customize it (see [devcontainer.json reference](https://code.visualstudio.com/docs/remote/containers#_devcontainerjson-reference) for more options): +``` +cd .devcontainer +cp devcontainer.example.json devcontainer.json +``` + +Then open your `laradock` folder in Visual Studio Code and click on popup button **Reopen in Container**. + ### 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. @@ -345,7 +355,7 @@ You could choose to use either: 1. Chrome Driver shipped with Laravel Dusk. (Default) 2. Chrome Driver installed in `workspace` container. (Required tweak on DuskTestCase class) -For Laravel 2.x, you need to update `DuskTestCase#prepare` method if you wish to go with option #2. +For Laravel Dusk 2.x, you need to update `DuskTestCase#prepare` method if you wish to go with option #2. ``` @@ -365,7 +375,7 @@ abstract class DuskTestCase extends BaseTestCase } ``` -For Laravel 1.x, you need to add `DuskTestCase#buildChromeProcess` method if you wish to go with option #2. +For Laravel Dusk 1.x, you need to add `DuskTestCase#buildChromeProcess` method if you wish to go with option #2. ``` Laradock is a full PHP development environment based on Docker. -## 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. +Supporting a variety of common services, all pre-configured to provide a full PHP development environment. -![](https://raw.githubusercontent.com/laradock/laradock/master/.github/home-page-images/laradock-logo.jpg) + +## Features +- Easy switch between PHP versions: 7.4, 7.3, 7.2, 7.1, 5.6... +- Choose your favorite database engine: MySQL, Postgres, MariaDB... +- Run your own stack: Memcached, HHVM, RabbitMQ... +- Each software runs on its own container: PHP-FPM, NGINX, PHP-CLI... +- Easy to customize any container, with simple edit to the `Dockerfile`. +- All Images extends from an official base Image. (Trusted base Images). +- Pre-configured NGINX to host any code at your root directory. +- Can use Laradock per project, or single Laradock for all projects. +- Easy to install/remove software's in Containers using environment variables. +- Clean and well structured Dockerfiles (`Dockerfile`). +- Latest version of the Docker Compose file (`docker-compose`). +- Everything is visible and editable. +- Fast Images Builds. +
+ +--- +### Use Docker First - Then Learn About It Later +--- ## Sponsors -

- - - Writing essays service Edubirdie - -

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Support Laradock with your [organization](https://opencollective.com/laradock/contribute/). +
+Your logo will show up on the [github repository](https://github.com/laradock/laradock/) index page and the [documentation](http://laradock.io/) main page. +
+For more info contact support@laradock.io.
- - - - - - - - - - -For basic sponsorships go to [Open Collective](https://opencollective.com/laradock#sponsor), for golden sponsorships contact support@laradock.io. -
-*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 @@ -82,25 +135,6 @@ That's it! enjoy :) - -## Features - -- Easy switch between PHP versions: 7.3, 7.2, 7.1, 5.6... -- Choose your favorite database engine: MySQL, Postgres, MariaDB... -- Run your own stack: Memcached, HHVM, RabbitMQ... -- Each software runs on its own container: PHP-FPM, NGINX, PHP-CLI... -- Easy to customize any container, with simple edit to the `Dockerfile`. -- All Images extends from an official base Image. (Trusted base Images). -- Pre-configured NGINX to host any code at your root directory. -- Can use Laradock per project, or single Laradock for all projects. -- Easy to install/remove software's in Containers using environment variables. -- Clean and well structured Dockerfiles (`Dockerfile`). -- Latest version of the Docker Compose file (`docker-compose`). -- Everything is visible and editable. -- Fast Images Builds. - - - ## Supported Software (Docker Images) @@ -159,6 +193,7 @@ That's it! enjoy :) - Eclipse Mosquitto - PHP Worker - Laravel Horizon + - Gearman - **Mail Servers:** - Mailu @@ -233,49 +268,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 :)* - - - -## What is Docker? - -[Docker](https://www.docker.com) is an open platform for developing, shipping, and running applications. -Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. -With Docker, you can manage your infrastructure in the same ways you manage your applications. -By taking advantage of Docker’s methodologies for shipping, testing, and deploying code quickly, you can significantly reduce the delay between writing code and running it in production. - - - - - - -## Why Docker not Vagrant!? - -[Vagrant](https://www.vagrantup.com) creates Virtual Machines in minutes while Docker creates Virtual Containers in seconds. - -Instead of providing a full Virtual Machines, like you get with Vagrant, Docker provides you **lightweight** Virtual Containers, that share the same kernel and allow to safely execute independent processes. - -In addition to the speed, Docker gives tons of features that cannot be achieved with Vagrant. - -Most importantly Docker can run on Development and on Production (same environment everywhere). While Vagrant is designed for Development only, (so you have to re-provision your server on Production every time). - - - - - - - -## Demo Video - -What's better than a **Demo Video**: - -- Laradock [v4.*](https://www.youtube.com/watch?v=TQii1jDa96Y) -- Laradock [v2.*](https://www.youtube.com/watch?v=-DamFMczwDA) -- Laradock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI) -- Laradock [v0.1](https://www.youtube.com/watch?v=3YQsHe6oF80) - - - - +--- @@ -286,24 +279,147 @@ You are welcome to join our chat room on Gitter. [![Gitter](https://badges.gitter.im/Laradock/laradock.svg)](https://gitter.im/Laradock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) +--- +Laradock exists thanks to all the people who contribute. +## Project Maintainers + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ Mahmoud Zalt +
+ @mahmoudz +
+ +
+ Bo-Yi Wu +
+ @appleboy +
+ +
+ Philippe Trépanier +
+ @philtrep +
+ +
+ Mike Erickson +
+ @mikeerickson +
+ +
+ Dwi Fahni Denni +
+ @zeroc0d3 +
+ +
+ Thor Erik +
+ @thorerik +
+ +
+ Winfried van Loon +
+ @winfried-van-loon +
+ +
+ TJ Miller +
+ @sixlive +
+ +
+ Yu-Lung Shao (Allen) +
+ @bestlong +
+ +
+ Milan Urukalo +
+ @urukalo +
+ +
+ Vince Chu +
+ @vwchu +
+ +
+ Huadong Zuo +
+ @zuohuadong +
+ +
+ Lan Phan +
+ @lanphan +
+ +
+ Ahkui +
+ @ahkui +
+ +
+ < Join Us > +
+ @laradock +
+ +## Code Contributors + + + +--- -## Donations +## Financial Contributors -> Help keeping the project development going, by [contributing](http://laradock.io/contributing) or donating a little. -> Thanks in advance. +Contribute and help us sustain the project. -Donate directly via [Paypal](https://paypal.me/mzmmzz) +Option 1: Donate directly to [Paypal](https://paypal.me/mzmmzz). -[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/mzmmzz) +[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/mzmmzz) -or show your support via [Beerpay](https://beerpay.io/laradock/laradock) +Option 2: Support us via [BeerPay](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) +Option 3: Become a backer on [Open Collective](https://opencollective.com/laradock/contribute). - + diff --git a/DOCUMENTATION/static/custom-style.css b/DOCUMENTATION/static/custom-style.css index 0f3957fc..d25a5ac1 100644 --- a/DOCUMENTATION/static/custom-style.css +++ b/DOCUMENTATION/static/custom-style.css @@ -11,3 +11,20 @@ height: 70px; padding: 25px; } +.palette-primary-deep-purple .article h1{ + color: #7e57c2; + font-size: 35px; +} +.palette-primary-deep-purple .article h2{ + + color: #ce2046; + font-size: 25px; +} +.palette-primary-deep-purple .article h3{ + color: #851d54; + font-size: 18px; +} +.palette-primary-deep-purple .article code{ + color: #851d54; + background: #eeeeeea8; +} diff --git a/DOCUMENTATION/themes/hugo-material-docs/layouts/index.html b/DOCUMENTATION/themes/hugo-material-docs/layouts/index.html index 5ee52d1c..502cd68c 100644 --- a/DOCUMENTATION/themes/hugo-material-docs/layouts/index.html +++ b/DOCUMENTATION/themes/hugo-material-docs/layouts/index.html @@ -1,8 +1,8 @@ {{ partial "head" . }} {{ if (eq (trim .Site.Params.provider " " | lower) "github") | and (isset .Site.Params "repo_url") }} - {{ $repo_id := replace .Site.Params.repo_url "https://github.com/" ""}} - {{ .Scratch.Set "repo_id" $repo_id }} + {{ $repo_id := replace .Site.Params.repo_url "https://github.com/" ""}} + {{ .Scratch.Set "repo_id" $repo_id }} {{ end }}
@@ -25,26 +25,32 @@
- -
- - - - - - - -
+ +
+ + + + + + + +
+ +


+ laradock logo {{ range where .Site.Pages "Type" "index" }} -

{{ .Title }} {{ if .IsDraft }} (Draft){{ end }}

+





+
+
+

{{ .Title }} {{ if .IsDraft }} (Draft){{ end }}

- {{ .Content }} + {{ .Content }} {{ end }}