diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..8c5ef1d8 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,25 @@ +language: bash +sudo: required +services: + - docker + +env: + matrix: + - PHP_VERSION=56 + - PHP_VERSION=70 + - PHP_VERSION=71 + - HUGO_VERSION=0.20 + +script: ./_scripts/travis-build.sh + +deploy: + provider: pages + skip_cleanup: true + local_dir: docs + github_token: $GITHUB_TOKEN + on: + branch: master + condition: -n "${HUGO_VERSION}" + +notifications: + email: false diff --git a/DOCUMENTATION/_settings/static/.gitkeep b/DOCUMENTATION/_settings/static/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/images/screenshot.png b/DOCUMENTATION/_settings/themes/hugo-material-docs/images/screenshot.png deleted file mode 100644 index 97ac0628..00000000 Binary files a/DOCUMENTATION/_settings/themes/hugo-material-docs/images/screenshot.png and /dev/null differ diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/images/tn.png b/DOCUMENTATION/_settings/themes/hugo-material-docs/images/tn.png deleted file mode 100644 index d3d374b3..00000000 Binary files a/DOCUMENTATION/_settings/themes/hugo-material-docs/images/tn.png and /dev/null differ diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/colors.png b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/colors.png deleted file mode 100644 index 45e4b604..00000000 Binary files a/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/colors.png and /dev/null differ diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/logo.png b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/logo.png deleted file mode 100644 index 573aca13..00000000 Binary files a/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/logo.png and /dev/null differ diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/screen.png b/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/screen.png deleted file mode 100644 index cb10504b..00000000 Binary files a/DOCUMENTATION/_settings/themes/hugo-material-docs/static/images/screen.png and /dev/null differ diff --git a/DOCUMENTATION/_settings/config.toml b/DOCUMENTATION/config.toml similarity index 89% rename from DOCUMENTATION/_settings/config.toml rename to DOCUMENTATION/config.toml index 90b5b535..31f30327 100644 --- a/DOCUMENTATION/_settings/config.toml +++ b/DOCUMENTATION/config.toml @@ -1,6 +1,6 @@ baseurl = "http://laradock.io/" languageCode = "en-us" -publishDir = "../../docs" +publishDir = "../docs" title = "Laradock" theme = "hugo-material-docs" metadataformat = "yaml" @@ -11,7 +11,7 @@ googleAnalytics = "UA-37514928-9" [params] # General information author = "Mahmoud Zalt" - description = "Laradock documentations." + description = "Full PHP development environment for Docker." copyright = "" # Repository @@ -19,7 +19,7 @@ googleAnalytics = "UA-37514928-9" repo_url = "" version = "" - logo = "" + logo = "images/logo.png" favicon = "" permalink = "#" @@ -62,8 +62,8 @@ googleAnalytics = "UA-37514928-9" weight = 3 [[menu.main]] - name = "Related Projects" - url = "related-projects/" + name = "Guides" + url = "guides/" weight = 4 [[menu.main]] @@ -71,15 +71,20 @@ googleAnalytics = "UA-37514928-9" url = "help/" weight = 5 +[[menu.main]] + name = "Related Projects" + url = "related-projects/" + weight = 6 + [[menu.main]] name = "Contributing" url = "contributing/" - weight = 6 + weight = 7 [[menu.main]] name = "License" url = "license/" - weight = 7 + weight = 8 # ------- MENU END ----------------------------------------- diff --git a/DOCUMENTATION/_settings/content/contributing/index.md b/DOCUMENTATION/content/contributing/index.md similarity index 87% rename from DOCUMENTATION/_settings/content/contributing/index.md rename to DOCUMENTATION/content/contributing/index.md index 0eb0cdbe..29b66b68 100644 --- a/DOCUMENTATION/_settings/content/contributing/index.md +++ b/DOCUMENTATION/content/contributing/index.md @@ -1,7 +1,7 @@ --- title: Contributing type: index -weight: 6 +weight: 7 --- @@ -38,17 +38,23 @@ You can request a new feature by submitting an [Issue](https://github.com/larado Laradock uses [Hugo](https://gohugo.io/) as website generator tool, with the [Material Docs theme](http://themes.gohugo.io/theme/material-docs/). You might need to check their docs quickly. +Go the `DOCUMENTATION/content` and search for the markdown file you want to edit -1. Install [Hugo](https://gohugo.io/) on your machine (easy thing). -2. Open the `DOCUMENTATION/_settings/content` and search for the markdown file you want to edit (every folder represents a section in the menu). -3. Delete the `/docs` folder from the root. -4. When you finish editing, go to `DOCUMENTATION/_settings/` and run the `hugo` command to generate the HTML docs (inside new `/docs` folder). +Note: Every folder represents a section in the sidebar "Menu". And every page and sidebar has a `weight` number to show it's position in the site. + +To update the sidebar or add a new section to it, you can edit this `DOCUMENTATION/config.toml` toml file. + +> The site will be auto-generated in the `docs/` folder by [Travis CI](https://travis-ci.org/laradock/laradock/). + + +
### To Host the website locally -Go to `DOCUMENTATION/_settings` in your terminal and run `hugo serve` to host the website locally. -### Edit the sidebar -To add a new section to the sidebar or edit existing one, you need to edit this file `DOCUMENTATION/_settings/config.toml`. +1. Install [Hugo](https://gohugo.io/) on your machine. +2. Edit the `DOCUMENTATION/content`. +3. Delete the `/docs` folder from the root. +4. After you finish the editing, go to `DOCUMENTATION/` and run the `hugo` command to generate the HTML docs (inside a new `/docs` folder). diff --git a/DOCUMENTATION/_settings/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md similarity index 100% rename from DOCUMENTATION/_settings/content/documentation/index.md rename to DOCUMENTATION/content/documentation/index.md diff --git a/DOCUMENTATION/_settings/content/getting-started/index.md b/DOCUMENTATION/content/getting-started/index.md similarity index 91% rename from DOCUMENTATION/_settings/content/getting-started/index.md rename to DOCUMENTATION/content/getting-started/index.md index 74f7143d..b5564dde 100644 --- a/DOCUMENTATION/_settings/content/getting-started/index.md +++ b/DOCUMENTATION/content/getting-started/index.md @@ -81,7 +81,7 @@ Your folder structure should look like this: *Or you can keep `default.conf` as it is, and create a separate config `my-site.conf` file for it.* -**In case of Apache:** :P +**In case of Apache:** :P
@@ -166,9 +166,7 @@ docker-compose up -d nginx mysql **Note**: The `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command. If you couldn't find them running then you need specify them as follow: `docker-compose up -d nginx php-fpm mysql workspace`. -You can select your own combination of containers form the list below: - -> `nginx`, `hhvm`, `php-fpm`, `mysql`, `percona`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `rabbitmq`, `beanstalkd-console`, `workspace`, `phpmyadmin`, `adminer`, `aerospike`, `pgadmin`, `elasticsearch`, `rethinkdb`, `postgres-postgis`, `certbot`, `mailhog`, `minio` and more...! +You can select your own combination of containers form [this list](http://laradock.io/introduction/#supported-software-images). *(Please note that sometimes we forget to update the docs, so check the `docker-compose.yml` file to see an updated list of all available containers).* @@ -186,7 +184,7 @@ docker-compose exec workspace bash docker exec -it {workspace-container-id} bash ``` -**Note:** You can add `--user=laradock` to have files created as your host's user. Example: +**Note:** You can add `--user=laradock` to have files created as your host's user. Example: ```shell docker-compose exec --user=laradock workspace bash @@ -206,6 +204,6 @@ DB_HOST=mysql *If you want to install Laravel as PHP project, see [How to Install Laravel in a Docker Container](#Install-Laravel).*
-5 - Open your browser and visit your localhost address `http://localhost/`. If you followed the multiple projects setup, you can visit `http://project-1.dev/` and `http://project-2.dev/`. But first don't +5 - Open your browser and visit your localhost address `http://localhost/`. If you followed the multiple projects setup, you can visit `http://project-1.dev/` and `http://project-2.dev/`. But first don't diff --git a/_guides/phpstorm.md b/DOCUMENTATION/content/guides/index.md similarity index 60% rename from _guides/phpstorm.md rename to DOCUMENTATION/content/guides/index.md index 8dad1a22..6be3e330 100644 --- a/_guides/phpstorm.md +++ b/DOCUMENTATION/content/guides/index.md @@ -1,49 +1,293 @@ -# PHPStorm Debugging Guide +--- +title: Guides +type: index +weight: 4 +--- + + + +* [Production Setup on Digital Ocean](#Digital-Ocean) +* [PHPStorm XDebug Setup](#PHPStorm-Debugging) + + + + +# Production Setup on Digital Ocean + +## Install Docker + +- Visit [DigitalOcean](https://cloud.digitalocean.com/login) and login. +- Click the `Create Droplet` button. +- Open the `One-click apps` tab. +- Select Docker with your preferred version. +- Continue creating the droplet as you normally would. +- If needed, check your e-mail for the droplet root password. + +## SSH to your Server + +Find the IP address of the droplet in the DigitalOcean interface. Use it to connect to the server. + +``` +ssh root@ipaddress +``` + +You may be prompted for a password. Type the one you found within your e-mailbox. It'll then ask you to change the password. + +You can now check if Docker is available: + +``` +$root@server:~# docker +``` + +## Set Up Your Laravel Project + +``` +$root@server:~# apt-get install git +$root@server:~# git clone https://github.com/laravel/laravel +$root@server:~# cd laravel +$root@server:~/laravel/ git submodule add https://github.com/LaraDock/laradock.git +$root@server:~/laravel/ cd laradock +``` + +## Install docker-compose command + +``` +$root@server:~/laravel/laradock# curl -L https://github.com/docker/compose/releases/download/1.8.0/run.sh > /usr/local/bin/docker-compose +$root@server:~/chmod +x /usr/local/bin/docker-compose +``` + +## Create Your LaraDock Containers + +``` +$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. + +## Go to Your Workspace + +``` +docker-compose exec workspace bash +``` + +## 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. + +``` +$ root@workspace:/var/www# composer install +$ root@workspace:/var/www# cp .env.example .env +$ root@workspace:/var/www# php artisan key:generate +$ root@workspace:/var/www# exit +$root@server:~/laravel/laradock# cd .. +$root@server:~/laravel# sudo chmod -R 777 storage bootstrap/cache +``` + +You can then view your Laravel site by visiting the IP address of your server in your browser. For example: + +``` +http://192.168.1.1 +``` + +It should show you the Laravel default welcome page. + +However, we want it to show up using your custom domain name, as well. + +## Using Your Own Domain Name + +Login to your DNS provider, such as Godaddy, Namecheap. + +Point the Custom Domain Name Server to: + +``` +ns1.digitalocean.com +ns2.digitalocean.com +ns3.digitalocean.com +``` + +Within DigitalOcean, you'll need to change some settings, too. + +Visit: https://cloud.digitalocean.com/networking/domains + +Add your domain name and choose the server IP you'd provision earlier. + +## Serving Site With NGINX (HTTP ONLY) + +Go back to command line. + +``` +$root@server:~/laravel/laradock# cd nginx +$root@server:~/laravel/laradock/nginx# vim laravel.conf +``` + +Remove `default_server` + +``` + listen 80 default_server; + listen [::]:80 default_server ipv6only=on; +``` + +And add `server_name` (your custom domain) + +``` + listen 80; + listen [::]:80 ipv6only=on; + server_name yourdomain.com; +``` + +## Rebuild Your Nginx + +``` +$root@server:~/laravel/laradock/nginx# docker-compose down +$root@server:~/laravel/laradock/nginx# docker-compose build nginx +``` + +## Re Run Your Containers MYSQL and NGINX + +``` +$root@server:~/laravel/laradock/nginx# docker-compose up -d nginx mysql +``` + +**View Your Site with HTTP ONLY (http://yourdomain.com)** + +## Run Site on SSL with Let's Encrypt Certificate + +**Note: You need to Use Caddy here Instead of Nginx** + +To go Caddy Folders and Edit CaddyFile + +``` +$root@server:~/laravel/laradock# cd caddy +$root@server:~/laravel/laradock/caddy# vim Caddyfile +``` + +Remove 0.0.0.0:80 + +``` +0.0.0.0:80 +root /var/www/public +``` + +and replace with your https://yourdomain.com + +``` +https://yourdomain.com +root /var/www/public +``` + +uncomment tls + +``` +#tls self-signed +``` + +and replace self-signed with your email address + +``` +tls serverbreaker@gmai.com +``` + +This is needed Prior to Creating Let's Encypt + +## Run Your Caddy Container without the -d flag and Generate SSL with Let's Encrypt + +``` +$root@server:~/laravel/laradock/caddy# docker-compose up caddy +``` + +You'll be prompt here to enter your email... you may enter it or not + +``` +Attaching to laradock_mysql_1, laradock_caddy_1 +caddy_1 | Activating privacy features... +caddy_1 | Your sites will be served over HTTPS automatically using Let's Encrypt. +caddy_1 | By continuing, you agree to the Let's Encrypt Subscriber Agreement at: +caddy_1 | https://letsencrypt.org/documents/LE-SA-v1.0.1-July-27-2015.pdf +caddy_1 | Activating privacy features... done. +caddy_1 | https://yourdomain.com +caddy_1 | http://yourdomain.com +``` + +After it finishes, press `Ctrl` + `C` to exit. + +## Stop All Containers and ReRun Caddy and Other Containers on Background + +``` +$root@server:~/laravel/laradock/caddy# docker-compose down +$root@server:~/laravel/laradock/caddy# docker-compose up -d mysql caddy +``` + +View your Site in the Browser Securely Using HTTPS (https://yourdomain.com) + +**Note that Certificate will be Automatically Renew By Caddy** + +>References: +> +- [https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04) +- [https://www.digitalocean.com/products/one-click-apps/docker/](https://www.digitalocean.com/products/one-click-apps/docker/) +- [https://docs.docker.com/engine/installation/linux/ubuntulinux/](https://docs.docker.com/engine/installation/linux/ubuntulinux/) +- [https://docs.docker.com/compose/install/](https://docs.docker.com/compose/install/) +- [https://caddyserver.com/docs/automatic-https](https://caddyserver.com/docs/automatic-https) +- [https://caddyserver.com/docs/tls](https://caddyserver.com/docs/tls) +- [https://caddyserver.com/docs/caddyfile](https://caddyserver.com/docs/caddyfile) + + + + + +
+
+
+
+
+ + +# PHPStorm XDebug Setup - [Intro](#Intro) - [Installation](#Installation) - - [Customize laradock/docker-compose.yml](#CustomizeDockerCompose) - - [Clean House](#InstallCleanHouse) - - [LaraDock Dial Tone](#InstallLaraDockDialTone) - - [hosts](#AddToHosts) - - [Firewall](#FireWall) + - [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) - + - [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`, +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`. + - 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](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](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. +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. @@ -51,7 +295,7 @@ Your PHPStorm will need to be able to receive a connection from PHP xdebug eithe ### Edit laradock/docker-compose.yml Set the following variables: ``` -### Workspace Utilities Container ########################### +### Workspace Utilities Container ############### workspace: build: @@ -60,9 +304,9 @@ Set the following variables: - INSTALL_XDEBUG=true - INSTALL_WORKSPACE_SSH=true ... - - -### PHP-FPM Container ####################################### + + +### PHP-FPM Container ##################### php-fpm: build: @@ -70,7 +314,7 @@ Set the following variables: args: - INSTALL_XDEBUG=true ... - + ``` ### Edit xdebug.ini files @@ -91,13 +335,13 @@ xdebug.cli_color=1 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). +- 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: +**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. @@ -107,7 +351,7 @@ Here are a few things I use to clean things up. if [ -n "$processes" ]; thend docker rm $processes fi - + images=`docker images -q -f dangling=true` if [ -n "$images" ]; then docker rmi $images @@ -140,13 +384,13 @@ alias dcleanlaradock=dcleanlaradockfunction ``` -#### Let's get a dial-tone with Laravel +## Let's get a dial-tone with Laravel ``` # barebones at this point docker-compose up -d nginx mysql -# run +# run docker-compose ps # Should see: @@ -163,7 +407,7 @@ laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222- ``` -#### Enable xDebug on php-fpm +## Enable xDebug on php-fpm In a host terminal sitting in the laradock folder, run: `./xdebugPhpFpm status` You should see something like the following: ``` @@ -181,39 +425,39 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will -#### PHPStorm Settings +## PHPStorm Settings - Here are some settings that are known to work: - `Settings/BuildDeploymentConnection` - ![Settings/BuildDeploymentConnection](photos/PHPStorm/Settings/BuildDeploymentConnection.png) - + - `Settings/BuildDeploymentConnectionMappings` - ![Settings/BuildDeploymentConnectionMappings](photos/PHPStorm/Settings/BuildDeploymentConnectionMappings.png) - + - `Settings/BuildDeploymentDebugger` - ![Settings/BuildDeploymentDebugger](photos/PHPStorm/Settings/BuildDeploymentDebugger.png) - + - `Settings/EditRunConfigurationRemoteWebDebug` - ![Settings/EditRunConfigurationRemoteWebDebug](photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png) - + - `Settings/EditRunConfigurationRemoteExampleTestDebug` - ![Settings/EditRunConfigurationRemoteExampleTestDebug](photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png) - + - `Settings/LangsPHPDebug` - ![Settings/LangsPHPDebug](photos/PHPStorm/Settings/LangsPHPDebug.png) - + - `Settings/LangsPHPInterpreters` - ![Settings/LangsPHPInterpreters](photos/PHPStorm/Settings/LangsPHPInterpreters.png) - + - `Settings/LangsPHPPHPUnit` - ![Settings/LangsPHPPHPUnit](photos/PHPStorm/Settings/LangsPHPPHPUnit.png) - + - `Settings/LangsPHPServers` - ![Settings/LangsPHPServers](photos/PHPStorm/Settings/LangsPHPServers.png) - + - `RemoteHost` To switch on this view, go to: `Menu/Tools/Deployment/Browse Remote Host`. - ![RemoteHost](photos/PHPStorm/RemoteHost.png) - + - `RemoteWebDebug` - ![DebugRemoteOn](photos/PHPStorm/DebugRemoteOn.png) @@ -258,14 +502,14 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will ### Debug WebSite -- In case xDebug is disabled, from the `laradock` folder run: +- In case xDebug is disabled, from the `laradock` folder run: `./xdebugPhpFpm start`. - - To switch xdebug off, run: + - To switch xdebug off, run: `./xdebugPhpFpm stop` - + - Start Remote Debugging - ![DebugRemoteOn](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/) @@ -274,7 +518,7 @@ If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will -#### Let's shell into workspace +## Let's shell into workspace Assuming that you are in laradock folder, type: `ssh -i workspace/insecure_id_rsa -p2222 root@laravel` **Cha Ching!!!!** @@ -285,7 +529,7 @@ Assuming that you are in laradock folder, type: -##### KiTTY +### 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: diff --git a/DOCUMENTATION/_settings/content/help/index.md b/DOCUMENTATION/content/help/index.md similarity index 100% rename from DOCUMENTATION/_settings/content/help/index.md rename to DOCUMENTATION/content/help/index.md diff --git a/DOCUMENTATION/_settings/content/index.md b/DOCUMENTATION/content/index.md similarity index 100% rename from DOCUMENTATION/_settings/content/index.md rename to DOCUMENTATION/content/index.md diff --git a/DOCUMENTATION/_settings/content/introduction/index.md b/DOCUMENTATION/content/introduction/index.md similarity index 55% rename from DOCUMENTATION/_settings/content/introduction/index.md rename to DOCUMENTATION/content/introduction/index.md index 041de143..0853c7da 100644 --- a/DOCUMENTATION/_settings/content/introduction/index.md +++ b/DOCUMENTATION/content/introduction/index.md @@ -4,18 +4,21 @@ type: index weight: 1 --- -Laradock strives to make the PHP development experience easier and faster. - -It contains pre-packaged Docker Images that provides you a wonderful *development* environment without requiring you to install PHP, NGINX, MySQL, Redis, and any other software on your machines. - -Laradock is configured to run Laravel Apps by default, and it can be modified to run all kinds of PHP Apps (Symfony, CodeIgniter, WordPress, Drupal...). +A full PHP development environment for Docker. + +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) ## 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 install `NGINX`, `PHP`, `Composer`, `MySQL`, `Redis` and `Beanstalkd`: 1 - Clone Laradock inside your PHP project: @@ -35,7 +38,7 @@ cp env-example .env docker-compose up -d nginx mysql redis beanstalkd ``` -3 - Open your project's `.env` file and set the following: +4 - Open your project's `.env` file and set the following: ```shell DB_HOST=mysql @@ -43,7 +46,7 @@ REDIS_HOST=redis QUEUE_HOST=beanstalkd ``` -4 - Open your browser and visit localhost: `http://localhost`. +5 - Open your browser and visit localhost: `http://localhost`. ```shell That's it! enjoy :) @@ -52,6 +55,63 @@ That's it! enjoy :) + +## Features + +- Easy switch between PHP versions: 7.1, 7.0, 5.6... +- Choose your favorite database engine: MySQL, Postgres, MariaDB... +- Run your own combination of software: Memcached, HHVM, Beanstalkd... +- Every software runs on a separate 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. +- More to come every week.. + + + + + +## Supported Software (Images) + +In adhering to the separation of concerns principle as promoted by Docker, Laradock runs each software on its own Container. +You can turn On/Off as many instances of as any container without worrying about the configurations, everything works like a charm. + +- **Database Engines:** +MySQL - MariaDB - MongoDB - Neo4j - RethinkDB - MSSQL - PostgreSQL - Postgres Postgis. +- **Cache Engines:** +Redis - Memcached - Aerospike +- **PHP Servers:** +NGINX - Apache2 - Caddy +- **PHP Compilers:** +PHP FPM - HHVM +- **Message Queuing:** +Beanstalkd - Beanstalkd Console - RabbitMQ - RabbitMQ Console - PHP Worker +- **Tools:** +HAProxy - Jenkins - ElasticSearch - Selenium - Certbot - Mailhog - Minio - Varnish - PhpMyAdmin - Adminer - PgAdmin - MailHog... + +Laradock introduces the **Workspace** Image, as a development environment. +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. + +**Workspace Image Tools** +PHP CLI - Composer - Git - Linuxbrew - Node - V8JS - Gulp - SQLite - xDebug - Envoy - Deployer - Vim - Yarn - SOAP - Drush... + +You can choose, which tools to install in your workspace container and other containers, from the `.env` file. + + +> If you modify `docker-compose.yml`, `.env` or any `dockerfile` file, you must re-build your containers, to see those effects in the running instance. + + + +If you can't find your Software in the list, build it yourself and sumit it. Contributions are welcomed :) + + + @@ -81,31 +141,12 @@ Most importantly Docker can run on Development and on Production (same environme - -## Laradock VS Homestead (For Laravel Developers) - -> Laradock It's like Laravel Homestead but for Docker instead of Vagrant. - -Laradock and [Homestead](https://laravel.com/docs/master/homestead) both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System). - -- Homestead is a tool that controls Vagrant for you (using Homestead special commands). And Vagrant manages your Virtual Machine. - -- Laradock is a tool that controls Docker for you (using Docker & Docker Compose official commands). And Docker manages your Virtual Containers. - -Running a virtual container is much faster than running a full virtual Machine. Thus **Laradock is much faster than Homestead**. - - - - - - - - ## Demo Video What's better than a **Demo Video**: +- Laradock v5.* (soon or never) - 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) @@ -117,88 +158,6 @@ What's better than a **Demo Video**: - -## Features - -- Easy switch between PHP versions: 7.0, 5.6, 5.5... -- Choose your favorite database engine: MySQL, Postgres, MariaDB... -- Run your own combination of software: Memcached, HHVM, Beanstalkd... -- Every software runs on a separate 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 for Laravel. -- Easy to apply configurations inside containers. -- Clean and well structured Dockerfiles (`Dockerfile`). -- Latest version of the Docker Compose file (`docker-compose`). -- Everything is visible and editable. -- Fast Images Builds. -- More to come every week.. - - - - - - - - -## Supported Software (Containers) - -- **Database Engines:** - - MySQL - - MariaDB - - MongoDB - - Neo4j - - RethinkDB - - PostgreSQL - - Postgres Postgis -- **Cache Engines:** - - Redis - - Memcached - - Aerospike -- **PHP Servers:** - - NGINX - - Apache2 - - Caddy -- **PHP Compilers:** - - PHP-FPM - - HHVM -- **Message Queuing Systems:** - - Beanstalkd - - Beanstalkd Console - - RabbitMQ - - RabbitMQ Console -- **Tools:** - - PhpMyAdmin - - Adminer - - PgAdmin - - ElasticSearch - - Selenium - - Certbot - - Mailhog - - Minio - - Workspace - - PHP7-CLI - - Composer - - Git - - Linuxbrew - - Node - - Gulp - - SQLite - - xDebug - - Envoy - - Deployer - - Vim - - Yarn - - ... Many other supported tools are not documented. (Will be updated soon) - ->If you can't find your Software, build it yourself and add it to this list. Contributions are welcomed :) - - - - - - - ## Chat with us diff --git a/DOCUMENTATION/_settings/content/license/index.md b/DOCUMENTATION/content/license/index.md similarity index 91% rename from DOCUMENTATION/_settings/content/license/index.md rename to DOCUMENTATION/content/license/index.md index d65e5abc..795d4c89 100644 --- a/DOCUMENTATION/_settings/content/license/index.md +++ b/DOCUMENTATION/content/license/index.md @@ -1,7 +1,7 @@ --- title: License type: index -weight: 7 +weight: 8 --- [MIT License](https://github.com/laradock/laradock/blob/master/LICENSE) (MIT) diff --git a/DOCUMENTATION/_settings/content/related-projects/index.md b/DOCUMENTATION/content/related-projects/index.md similarity index 98% rename from DOCUMENTATION/_settings/content/related-projects/index.md rename to DOCUMENTATION/content/related-projects/index.md index b5c30959..de7d0cd0 100644 --- a/DOCUMENTATION/_settings/content/related-projects/index.md +++ b/DOCUMENTATION/content/related-projects/index.md @@ -1,7 +1,7 @@ --- title: Related Projects type: index -weight: 4 +weight: 6 --- Laradock related projects: diff --git a/DOCUMENTATION/_settings/static/CNAME b/DOCUMENTATION/static/CNAME similarity index 100% rename from DOCUMENTATION/_settings/static/CNAME rename to DOCUMENTATION/static/CNAME diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/CHANGELOG.md b/DOCUMENTATION/themes/hugo-material-docs/CHANGELOG.md similarity index 100% rename from DOCUMENTATION/_settings/themes/hugo-material-docs/CHANGELOG.md rename to DOCUMENTATION/themes/hugo-material-docs/CHANGELOG.md diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/LICENSE.md b/DOCUMENTATION/themes/hugo-material-docs/LICENSE.md similarity index 100% rename from DOCUMENTATION/_settings/themes/hugo-material-docs/LICENSE.md rename to DOCUMENTATION/themes/hugo-material-docs/LICENSE.md diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/README.md b/DOCUMENTATION/themes/hugo-material-docs/README.md similarity index 100% rename from DOCUMENTATION/_settings/themes/hugo-material-docs/README.md rename to DOCUMENTATION/themes/hugo-material-docs/README.md diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/archetypes/default.md b/DOCUMENTATION/themes/hugo-material-docs/archetypes/default.md similarity index 100% rename from DOCUMENTATION/_settings/themes/hugo-material-docs/archetypes/default.md rename to DOCUMENTATION/themes/hugo-material-docs/archetypes/default.md diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/404.html b/DOCUMENTATION/themes/hugo-material-docs/layouts/404.html similarity index 100% rename from DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/404.html rename to DOCUMENTATION/themes/hugo-material-docs/layouts/404.html diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/_default/__list.html b/DOCUMENTATION/themes/hugo-material-docs/layouts/_default/__list.html similarity index 100% rename from DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/_default/__list.html rename to DOCUMENTATION/themes/hugo-material-docs/layouts/_default/__list.html diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/_default/single.html b/DOCUMENTATION/themes/hugo-material-docs/layouts/_default/single.html similarity index 100% rename from DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/_default/single.html rename to DOCUMENTATION/themes/hugo-material-docs/layouts/_default/single.html diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/index.html b/DOCUMENTATION/themes/hugo-material-docs/layouts/index.html similarity index 100% rename from DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/index.html rename to DOCUMENTATION/themes/hugo-material-docs/layouts/index.html diff --git a/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/drawer.html b/DOCUMENTATION/themes/hugo-material-docs/layouts/partials/drawer.html similarity index 86% rename from DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/drawer.html rename to DOCUMENTATION/themes/hugo-material-docs/layouts/partials/drawer.html index ada64f1a..cf03d552 100644 --- a/DOCUMENTATION/_settings/themes/hugo-material-docs/layouts/partials/drawer.html +++ b/DOCUMENTATION/themes/hugo-material-docs/layouts/partials/drawer.html @@ -1,11 +1,11 @@