<h4id="create-your-laradock-containers">Create Your LaraDock Containers</h4>
<pre><code>$root@server:~/laravel/laradock# docker-compose up -d nginx mysql
</code></pre>
<p>Note that more containers are available, find them in the <ahref="http://laradock.io/introduction/#supported-software-containers">docs</a> or the <code>docker-compose.yml</code> file.</p>
<h4id="go-to-your-workspace">Go to Your Workspace</h4>
<pre><code>docker-compose exec workspace bash
</code></pre>
<h4id="install-and-configure-laravel">Install and configure Laravel</h4>
<p>Let’s install Laravel’s dependencies, add the <code>.env</code> file, generate the key and give proper permissions to the cache folder.</p>
<h4id="re-run-your-containers-mysql-and-nginx">Re Run Your Containers MYSQL and NGINX</h4>
<pre><code>$root@server:~/laravel/laradock/nginx# docker-compose up -d nginx mysql
</code></pre>
<p><strong>View Your Site with HTTP ONLY (<ahref="http://yourdomain.com">http://yourdomain.com</a>)</strong></p>
<h4id="run-site-on-ssl-with-let-s-encrypt-certificate">Run Site on SSL with Let’s Encrypt Certificate</h4>
<p><strong>Note: You need to Use Caddy here Instead of Nginx</strong></p>
<p>To go Caddy Folders and Edit CaddyFile</p>
<pre><code>$root@server:~/laravel/laradock# cd caddy
$root@server:~/laravel/laradock/caddy# vim Caddyfile
</code></pre>
<p>Remove 0.0.0.0:80</p>
<pre><code>0.0.0.0:80
root /var/www/public
</code></pre>
<p>and replace with your <ahref="https://yourdomain.com">https://yourdomain.com</a></p>
<pre><code>https://yourdomain.com
root /var/www/public
</code></pre>
<p>uncomment tls</p>
<pre><code>#tls self-signed
</code></pre>
<p>and replace self-signed with your email address</p>
<pre><code>tls serverbreaker@gmai.com
</code></pre>
<p>This is needed Prior to Creating Let’s Encypt</p>
<h4id="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</h4>
<pre><code>$root@server:~/laravel/laradock/caddy# docker-compose up caddy
</code></pre>
<p>You’ll be prompt here to enter your email… you may enter it or not</p>
<pre><code>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:
<p>After it finishes, press <code>Ctrl</code> + <code>C</code> to exit.</p>
<h4id="stop-all-containers-and-rerun-caddy-and-other-containers-on-background">Stop All Containers and ReRun Caddy and Other Containers on Background</h4>
<pre><code>$root@server:~/laravel/laradock/caddy# docker-compose down
$root@server:~/laravel/laradock/caddy# docker-compose up -d mysql caddy
</code></pre>
<p>View your Site in the Browser Securely Using HTTPS (<ahref="https://yourdomain.com">https://yourdomain.com</a>)</p>
<p><strong>Note that Certificate will be Automatically Renew By Caddy</strong></p>
<li><ahref="#UsagePHPStormDebugSite">Debug Web Site</a></li>
</ul></li>
</ul></li>
<li><ahref="#SSHintoWorkspace">SSH into workspace</a>
<ul>
<li><ahref="#InstallKiTTY">KiTTY</a></li>
</ul></li>
</ul>
<p><aname="Intro"></a></p>
<h2id="intro">Intro</h2>
<p>Wiring up <ahref="https://laravel.com/">Laravel</a>, <ahref="https://github.com/LaraDock/laradock">LaraDock</a> [Laravel+Docker] and <ahref="https://www.jetbrains.com/phpstorm/">PHPStorm</a> to play nice together complete with remote xdebug’ing as icing on top! Although this guide is based on <code>PHPStorm Windows</code>,
you should be able to adjust accordingly. This guide was written based on Docker for Windows Native.</p>
<p><aname="Installation"></a></p>
<h2id="installation">Installation</h2>
<ul>
<li>This guide assumes the following:
<ul>
<li>you have already installed and are familiar with Laravel, LaraDock and PHPStorm.</li>
<li>you have installed Laravel as a parent of <code>laradock</code>. This guide assumes <code>/c/_dk/laravel</code>.</li>
</ul></li>
</ul>
<p><aname="AddToHosts"></a></p>
<h2id="hosts">hosts</h2>
<ul>
<li><p>Add <code>laravel</code> to your hosts file located on Windows 10 at <code>C:\Windows\System32\drivers\etc\hosts</code>. It should be set to the IP of your running container. Mine is: <code>10.0.75.2</code>
On Windows you can find it by opening Windows <code>Hyper-V Manager</code>.</p>
<li><p><ahref="https://github.com/scottlerch/HostsFileEditor">Hosts File Editor</a> makes it easy to change your hosts file.</p>
<ul>
<li>Set <code>laravel</code> to your docker host IP. See <ahref="photos/SimpleHostsEditor/AddHost_laravel.png">Example</a>.</li>
</ul></li>
</ul>
<p><aname="FireWall"></a></p>
<h2id="firewall">Firewall</h2>
<p>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.</p>
<ul>
<li>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.</li>
<li>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.</li>
<h3id="need-to-clean-house-first">Need to clean house first?</h3>
<p>Make sure you are starting with a clean state. For example, do you have other LaraDock containers and images?
Here are a few things I use to clean things up.</p>
<ul>
<li><p>Delete all containers using <code>grep laradock_</code> on the names, see: <ahref="https://linuxconfig.org/remove-all-containners-based-on-docker-image-name">Remove all containers based on docker image name</a>.
<strong>Note:</strong> This will only delete images that were built with <code>LaraDock</code>, <strong>NOT</strong><code>laradock/*</code> which are pulled down by <code>LaraDock</code> such as <code>laradock/workspace</code>, etc.
<strong>Note:</strong> Some may fail with:
<code>Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images</code></p></li>
<li><p>I added this to my <code>.bashrc</code> to remove orphaned images.</p>
<pre><code>dclean() {
processes=`docker ps -q -f status=exited`
if [ -n "$processes" ]; thend
docker rm $processes
fi
images=`docker images -q -f dangling=true`
if [ -n "$images" ]; then
docker rmi $images
fi
}
</code></pre></li>
<li><p>If you frequently switch configurations for LaraDock, you may find that adding the following and added to your <code>.bashrc</code> or equivalent useful:
<p>It contains pre-packaged Docker Images that provides you a wonderful <em>development</em> environment without requiring you to install PHP, NGINX, MySQL, Redis, and any other software on your machines.</p>
<p>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…).</p>
<p>Let’s see how easy it is to install <code>NGINX</code>, <code>PHP</code>, <code>Composer</code>, <code>MySQL</code>, <code>Redis</code> and <code>beanstalkd</code>:</p>
<p><ahref="https://www.docker.com">Docker</a> is an open-source project that automates the deployment of applications inside software containers, by providing an additional layer of abstraction and automation of <ahref="https://en.wikipedia.org/wiki/Operating-system-level_virtualization">operating-system-level virtualization</a> on Linux, Mac OS and Windows.</p>
<p><aname="why-docker-not-vagrant"></a></p>
<h2id="why-docker-not-vagrant">Why Docker not Vagrant!?</h2>
<p><ahref="https://www.vagrantup.com">Vagrant</a> creates Virtual Machines in minutes while Docker creates Virtual Containers in seconds.</p>
<p>Instead of providing a full Virtual Machines, like you get with Vagrant, Docker provides you <strong>lightweight</strong> Virtual Containers, that share the same kernel and allow to safely execute independent processes.</p>
<p>In addition to the speed, Docker gives tons of features that cannot be achieved with Vagrant.</p>
<p>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).</p>
<p>Laradock and <ahref="https://laravel.com/docs/master/homestead">Homestead</a> both give you complete virtual development environments. (Without the need to install and configure every single software on your own Operating System).</p>
<li><p>Laradock is a tool that controls Docker for you (using Docker & Docker Compose official commands). And Docker manages your Virtual Containers.</p></li>
<li><p>Note 2: To keep track of your Laradock changes, between your projects and also keep Laradock updated. <ahref="http://laradock.io/documentation/#keep-track-of-your-laradock-changes">Check this</a></p></li>
<p><strong>In case of NGINX:</strong> open <code>nginx/sites/default.conf</code> and change the <code>root</code> from <code>/var/www/public</code> to <code>/var/www/{my-project-folder-name}/public</code>.</p>
<p>You can rename the config files, project folders and domains as you like, just make sure the <code>root</code> in the config files, is pointing to the correct project folder name.</p>
<li>Upgrade to Docker <ahref="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <ahref="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
<li>Use Laradock v3.*. Visit the <ahref="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">LaraDock-ToolBox</a> branch. <em>(outdated)</em></li>
<p><strong>Warning:</strong> If you used an older version of Laradock it’s highly recommended to rebuild the containers you need to use <ahref="#Build-Re-build-Containers">see how you rebuild a container</a> in order to prevent as much errors as possible.</p>
<p>You can edit the <code>.env</code> file to chose which software’s you want to be installed in your environment. You can always refer to the <code>docker-compose.yml</code> file to see how those variables are been used.</p>
<p>2 - Build the enviroment and run it using <code>docker-compose</code></p>
<pre><codeclass="language-bash">docker-compose up -d nginx mysql
</code></pre>
<p><strong>Note</strong>: The <code>workspace</code> and <code>php-fpm</code> will run automatically in most of the cases, so no need to specify them in the <code>up</code> command. If you couldn’t find them running then you need specify them as follow: <code>docker-compose up -d nginx php-fpm mysql workspace</code>.</p>
<p><em>(Please note that sometimes we forget to update the docs, so check the <code>docker-compose.yml</code> file to see an updated list of all available containers).</em></p>
<p>Open your PHP project’s <code>.env</code> file or whichever configuration file you are reading from, and set the database host <code>DB_HOST</code> to <code>mysql</code>:</p>
5 - Open your browser and visit your localhost address <code>http://localhost/</code>. If you followed the multiple projects setup, you can visit <code>http://project-1.dev/</code> and <code>http://project-2.dev/</code>. But first don’t</p>
<p>To add an image (software), just edit the <code>docker-compose.yml</code> and add your container details, to do so you need to be familiar with the <ahref="https://docs.docker.com/compose/compose-file/">docker compose file syntax</a>.</p>
<p>Before installing PHP extensions, you have to decide whether you need for the <code>FPM</code> or <code>CLI</code> because each lives on a different container, if you need it for both you have to edit both containers.</p>
<p>The PHP-FPM extensions should be installed in <code>php-fpm/Dockerfile-XX</code>. <em>(replace XX with your default PHP version number)</em>.
<br>
The PHP-CLI extensions should be installed in <code>workspace/Dockerfile</code>.</p>
<p>The PHP-FPM is responsible of serving your application code, you don’t have to change the PHP-CLI version if you are planning to run your application on different PHP-FPM version.</p>
<p>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.</p>
<p>Right now you have to manually edit the <code>Dockerfile</code> or create a new one like it’s done for the PHP-FPM. (consider contributing).</p>
<p>1 - First install <code>xDebug</code> in the Workspace and the PHP-FPM Containers:
<br>
a) open the <code>docker-compose.yml</code> file
<br>
b) search for the <code>INSTALL_XDEBUG</code> argument under the Workspace Container
<br>
c) set it to <code>true</code>
<br>
d) search for the <code>INSTALL_XDEBUG</code> argument under the PHP-FPM Container
<br>
e) set it to <code>true</code></p>
<p>It should be like this:</p>
<pre><codeclass="language-yml"> workspace:
build:
context: ./workspace
args:
- INSTALL_XDEBUG=true
...
php-fpm:
build:
context: ./php-fpm
args:
- INSTALL_XDEBUG=true
...
</code></pre>
<p>2 - Re-build the containers <code>docker-compose build workspace php-fpm</code></p>
<p>3 - Open <code>laradock/workspace/xdebug.ini</code> and/or <code>laradock/php-fpm/xdebug.ini</code> and enable at least the following configurations:</p>
<pre><code>xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_connect_back=1
</code></pre>
<p>For information on how to configure xDebug with your IDE and work it out, check this <ahref="https://github.com/LarryEitel/laravel-laradock-phpstorm">Repository</a>.</p>
<p>To control the behavior of xDebug (in the <code>php-fpm</code> Container), you can run the following commands from the Laradock root folder, (at the same prompt where you run docker-compose):</p>
<p>Note: If <code>./xdebugPhpFpm</code> doesn’t execute and gives <code>Permission Denied</code> error the problem can be that file <code>xdebugPhpFpm</code> doesn’t have execution access. This can be fixed by running <code>chmod</code> command with desired access permissions.</p>
<p>It’s recommended for production to create a custom <code>docker-compose.yml</code> file. For that reason, Laradock is shipped with <code>production-docker-compose.yml</code> which should contain only the containers you are planning to run on production (usage example: <code>docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...</code>).</p>
<p>Note: The Database (MySQL/MariaDB/…) ports should not be forwarded on production, because Docker will automatically publish the port on the host, which is quite insecure, unless specifically told not to. So make sure to remove these lines:</p>
<p>To learn more about how Docker publishes ports, please read <ahref="https://fralef.me/docker-and-iptables.html">this excellent post on the subject</a>.</p>
<p>Since the new Laravel application is in the <code>my-cool-app</code> folder, we need to replace <code>../:/var/www</code> with <code>../my-cool-app/:/var/www</code>, as follow:</p>
<p>Add <code>--user=laradock</code> (example <code>docker-compose exec --user=laradock workspace bash</code>) to have files created as your host’s user.</p>
<p>If you don’t find the <code>REDIS_HOST</code> variable in your <code>.env</code> file. Go to the database configuration file <code>config/database.php</code> and replace the default <code>127.0.0.1</code> IP with <code>redis</code> for Redis like this:</p>
<p>3 - To enable Redis Caching and/or for Sessions Management. Also from the <code>.env</code> file set <code>CACHE_DRIVER</code> and <code>SESSION_DRIVER</code> to <code>redis</code> instead of the default <code>file</code>.</p>
<pre><codeclass="language-env">CACHE_DRIVER=redis
SESSION_DRIVER=redis
</code></pre>
<p>4 - Finally make sure you have the <code>predis/predis</code> package <code>(~1.0)</code> installed via Composer:</p>
<p>More details about this <ahref="https://github.com/jenssegers/laravel-mongodb#installation">here</a>.</p>
<p>7 - Test it:</p>
<ul>
<li>First let your Models extend from the Mongo Eloquent Model. Check the <ahref="https://github.com/jenssegers/laravel-mongodb#eloquent">documentation</a>.</li>
<li>Enter the Workspace Container.</li>
<li>Migrate the Database <code>php artisan migrate</code>.</li>
<p>1 - Install the ElasticSearch plugin like <ahref="https://www.elastic.co/guide/en/elasticsearch/plugins/current/plugins-delete-by-query.html">delete-by-query</a>.</p>
<p>The RethinkDB is an open-source Database for Real-time Web (<ahref="https://rethinkdb.com/">RethinkDB</a>).
A package (<ahref="https://github.com/duxet/laravel-rethinkdb">Laravel RethinkDB</a>) is being developed and was released a version for Laravel 5.2 (experimental).</p>
<p>1 - Run the RethinkDB Container (<code>rethinkdb</code>) with the <code>docker-compose up</code> command.</p>
<pre><codeclass="language-bash">docker-compose up -d rethinkdb
</code></pre>
<p>2 - Access the RethinkDB Administration Console <ahref="http://localhost:8090/#tables">http://localhost:8090/#tables</a> for create a database called <code>database</code>.</p>
<p>3 - Add the RethinkDB configurations to the <code>config/database.php</code> configuration file:</p>
<p>To change the timezone for the <code>workspace</code> container, modify the <code>TZ</code> build argument in the Docker Compose file to one in the <ahref="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">TZ database</a>.</p>
<p>For example, if I want the timezone to be <code>New York</code>:</p>
<pre><codeclass="language-yml"> workspace:
build:
context: ./workspace
args:
- TZ=America/New_York
...
</code></pre>
<p>We also recommend <ahref="http://www.camroncade.com/managing-timezones-with-laravel/">setting the timezone in Laravel</a>.</p>
<p>You can access the <code>workspace</code> container through <code>localhost:2222</code> by setting the <code>INSTALL_WORKSPACE_SSH</code> build argument to <code>true</code>.</p>
<p>To change the default forwarded port for ssh:</p>
<p>You can forward the MySQL/MariaDB port to your host by making sure these lines are added to the <code>mysql</code> or <code>mariadb</code> section of the <code>docker-compose.yml</code> or in your <ahref="https://docs.docker.com/compose/extends/">environment specific Compose</a> file.</p>
<p>Modify the <code>mysql/my.cnf</code> file to set your port number, <code>1234</code> is used as an example.</p>
<pre><code>[mysqld]
port=1234
</code></pre>
<p>If you need <ahref="#MySQL-access-from-host">MySQL access from your host</a>, do not forget to change the internal port number (<code>"3306:3306"</code> -><code>"3306:1234"</code>) in the docker-compose configuration file.</p>
<p>Assuming your custom domain is <code>laravel.dev</code></p>
<p>1 - Open your <code>/etc/hosts</code> file and map your localhost address <code>127.0.0.1</code> to the <code>laravel.dev</code> domain, by adding the following:</p>
<p>Enabling Global Composer Install during the build for the container allows you to get your composer requirements installed and available in the container after the build is done.</p>
<p>1 - Open the <code>docker-compose.yml</code> file</p>
<p>2 - Search for the <code>COMPOSER_GLOBAL_INSTALL</code> argument under the Workspace Container and set it to <code>true</code></p>
<p>It should be like this:</p>
<pre><codeclass="language-yml"> workspace:
build:
context: ./workspace
args:
- COMPOSER_GLOBAL_INSTALL=true
...
</code></pre>
<p>3 - Now add your dependencies to <code>workspace/composer.json</code></p>
<p>4 - Re-build the Workspace Container <code>docker-compose build workspace</code></p>
<p><ahref="https://github.com/hirak/prestissimo">Prestissimo</a> is a plugin for composer which enables parallel install functionality.</p>
<p>1 - Enable Running Global Composer Install during the Build:</p>
<p>Click on this <ahref="#Enable-Global-Composer-Build-Install">Enable Global Composer Build Install</a> and do steps 1 and 2 only then continue here.</p>
<p>2 - Add prestissimo as requirement in Composer:</p>
<p>a - Now open the <code>workspace/composer.json</code> file</p>
<p>b - Add <code>"hirak/prestissimo": "^0.3"</code> as requirement</p>
<p>c - Re-build the Workspace Container <code>docker-compose build workspace</code></p>
<p>Yarn is a new package manager for JavaScript. It is so faster than npm, which you can find <ahref="http://yarnpkg.com/en/compare">here</a>.To install NodeJS and <ahref="https://yarnpkg.com/">Yarn</a> in the Workspace container:</p>
<p>1 - Open the <code>docker-compose.yml</code> file</p>
<p>2 - Search for the <code>INSTALL_NODE</code> and <code>INSTALL_YARN</code> argument under the Workspace Container and set it to <code>true</code></p>
<p>It should be like this:</p>
<pre><codeclass="language-yml"> workspace:
build:
context: ./workspace
args:
- INSTALL_NODE=true
- INSTALL_YARN=true
...
</code></pre>
<p>3 - Re-build the container <code>docker-compose build workspace</code></p>
<p>Linuxbrew is a package manager for Linux. It is the Linux version of MacOS Homebrew and can be found <ahref="http://linuxbrew.sh">here</a>. To install Linuxbrew in the Workspace container:</p>
<p>1 - Open the <code>docker-compose.yml</code> file</p>
<p>2 - Search for the <code>INSTALL_LINUXBREW</code> argument under the Workspace Container and set it to <code>true</code></p>
<p>It should be like this:</p>
<pre><codeclass="language-yml"> workspace:
build:
context: ./workspace
args:
- INSTALL_LINUXBREW=true
...
</code></pre>
<p>3 - Re-build the container <code>docker-compose build workspace</code></p>
<p>When you start your docker container, Laradock will copy the <code>aliases.sh</code> file located in the <code>laradock/workspace</code> directory and add sourcing to the container <code>~/.bashrc</code> file.</p>
<li>Stop the docker VM <code>docker-machine stop {default}</code></li>
<li>Install Docker for <ahref="https://docs.docker.com/docker-for-mac/">Mac</a> or <ahref="https://docs.docker.com/docker-for-windows/">Windows</a>.</li>
<h3id="workaround-a-using-dinghy">Workaround A: using dinghy</h3>
<p><ahref="https://github.com/codekitchen/dinghy">Dinghy</a> creates its own VM using docker-machine, it will not modify your existing docker-machine VMs.</p>
<p>Quick Setup giude, (we recommend you check their docs)</p>
<p>1) <code>brew tap codekitchen/dinghy</code></p>
<p>2) <code>brew install dinghy</code></p>
<p>3) <code>dinghy create --provider virtualbox</code> (must have virtualbox installed, but they support other providers if you prefer)</p>
<p>4) after the above command is done it will display some env variables, copy them to the bash profile or zsh or.. (this will instruct docker to use the server running inside the VM)</p>
<p>5) <code>docker-compose up ...</code></p>
<h3id="workaround-b-using-d4m-nfs">Workaround B: using d4m-nfs</h3>
<p><ahref="https://github.com/IFSight/d4m-nfs">D4m-nfs</a> automatically mount NFS volume instead of osxfs one.</p>
<p>4) Create (or edit) the file <code>~/d4m-nfs/etc/d4m-nfs-mounts.txt</code>, and write the follwing configuration in it:</p>
<pre><codeclass="language-txt">/Users:/Users
</code></pre>
<p>5) Create (or edit) the file <code>/etc/exports</code>, make sure it exists and is empty. (There may be collisions if you come from Vagrant or if you already executed the <code>d4m-nfs.sh</code> script before).</p>
<p><em>Note: If you faced any errors, try restarting Docker, and make sure you have no spaces in the <code>d4m-nfs-mounts.txt</code> file, and your <code>/etc/exports</code> file is clear.</em></p>
<h3id="other-good-workarounds">Other good workarounds:</h3>
<h2id="i-see-a-blank-white-page-instead-of-the-laravel-welcome-page">I see a blank (white) page instead of the Laravel ‘Welcome’ page!</h2>
<h2id="i-see-an-error-message-containing-address-already-in-use-or-port-is-already-allocated">I see an error message containing <code>address already in use</code> or <code>port is already allocated</code></h2>
<p>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 <code>apache</code>/<code>httpd</code> service or other development tools you have installed.</p>
<p>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:</p>
<li>Check your running Laravel application IP by dumping <code>Request::ip()</code> variable using <code>dd(Request::ip())</code> anywhere on your application. The result is the IP of your Laravel container.</li>
<li>Change the <code>DB_HOST</code> variable on env with the IP that you received from previous step.</li>
<li>Change the <code>DB_HOST</code> value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this as <code>mysql</code></li>
<p>You can as well can open an <ahref="https://github.com/laradock/laradock/issues">issue</a> on Github (will be labeled as Question) and discuss it with people on <ahref="https://gitter.im/Laradock/laradock">Gitter</a>.</p>
<h2id="i-have-a-question-problem">I have a Question/Problem</h2>
<p>If you have questions about how to use Laradock, please direct your questions to the discussion on <ahref="https://gitter.im/Laradock/laradock">Gitter</a>. If you believe your question could help others, then consider opening an <ahref="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as <code>Question</code>) And you can still seek help on Gitter for it.</p>
<li><p>Before you submit your issue search the archive, maybe your question was already answered couple hours ago (search in the closed Issues as well).</p></li>
<li><p>Decide if the Issue belongs to this project or to <ahref="https://github.com/docker">Docker</a> itself! or even the tool you are using such as Nginx or MongoDB…</p></li>
<p>You can request a new feature by submitting an <ahref="https://github.com/laradock/laradock/issues">Issue</a> (it will be labeled as <code>Feature Suggestion</code>). If you would like to implement a new feature then consider submitting a Pull Request yourself.</p>
<h2id="i-want-to-update-the-documentation-site">I want to update the Documentation (Site)</h2>
<p>Laradock uses <ahref="https://gohugo.io/">Hugo</a> as website generator tool, with the <ahref="http://themes.gohugo.io/theme/material-docs/">Material Docs theme</a>. You might need to check their docs quickly.</p>
<p>Go the <code>DOCUMENTATION/_settings/content</code> and search for the markdown file you want to edit (every folder represents a section in the menu).</p>
<p>To edit the sidebar or add a new section, you need to edit this file <code>DOCUMENTATION/_settings/config.toml</code> as well.</p>
<p><em>The site will be autogenerated in the <code>docs/</code> folder by <ahref="https://travis-ci.com/">Travis</a>.</em></p>
<h3id="to-host-the-website-locally">To Host the website locally</h3>
<li>When you finish editing, go to <code>DOCUMENTATION/_settings/</code> and run the <code>hugo</code> command to generate the HTML docs (inside new <code>/docs</code> folder).</li>
<li><p>Search <ahref="https://github.com/laradock/laradock/pulls">GitHub</a> for an open or closed Pull Request that relates to your submission. You don’t want to duplicate efforts.</p></li>
<pre><codeclass="language-shell">git rebase master -i
git push origin my-fix-branch -f
</code></pre>
<p><em>WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.</em></p>