123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
- <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
- <channel>
- <title>Getting-starteds on Laradock</title>
- <link>http://laradock.io/getting-started/index.xml</link>
- <description>Recent content in Getting-starteds on Laradock</description>
- <generator>Hugo -- gohugo.io</generator>
- <language>en-us</language>
- <atom:link href="http://laradock.io/getting-started/index.xml" rel="self" type="application/rss+xml" />
-
- <item>
- <title>Getting Started</title>
- <link>http://laradock.io/getting-started/</link>
- <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
-
- <guid>http://laradock.io/getting-started/</guid>
- <description>
- <h2 id="requirements">Requirements</h2>
- <ul>
- <li><a href="https://git-scm.com/downloads">Git</a></li>
- <li><a href="https://www.docker.com/products/docker/">Docker</a> <code>&gt;= 1.12</code></li>
- </ul>
- <h2 id="installation">Installation</h2>
- <p>Choose the setup the best suits your needs.</p>
- <ul>
- <li><a href="#A">A) Setup for Single Project</a>
- <ul>
- <li><a href="#A1">A.1) Already have a PHP project</a></li>
- <li><a href="#A2">A.2) Don&rsquo;t have a PHP project yet</a></li>
- </ul></li>
- <li><a href="#B">B) Setup for Multiple Projects</a></li>
- </ul>
- <p><a name="A"></a></p>
- <h3 id="a-setup-for-single-project">A) Setup for Single Project</h3>
- <blockquote>
- <p>(Follow these steps if you want a separate Docker environment for each project)</p>
- </blockquote>
- <p><a name="A1"></a></p>
- <h3 id="a-1-already-have-a-php-project">A.1) Already have a PHP project:</h3>
- <p>1 - Clone laradock on your project root directory:</p>
- <pre><code class="language-bash">git submodule add https://github.com/Laradock/laradock.git
- </code></pre>
- <p><strong>Notes:</strong></p>
- <ul>
- <li><p>If you are not using Git yet for your project, you can use <code>git clone</code> instead of <code>git submodule</code>.</p></li>
- <li><p>Note 2: To keep track of your Laradock changes, between your projects and also keep Laradock updated. <a href="http://laradock.io/documentation/#keep-track-of-your-laradock-changes">Check this</a></p></li>
- </ul>
- <p>Your folder structure should look like this:</p>
- <pre><code>+ project-a
- + laradock-a
- + project-b
- + laradock-b
- </code></pre>
- <p>(It&rsquo;s important to rename the folders differently in each project.)</p>
- <blockquote>
- <p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
- </blockquote>
- <p><a name="A2"></a></p>
- <h3 id="a-2-don-t-have-a-php-project-yet">A.2) Don&rsquo;t have a PHP project yet:</h3>
- <p>1 - Clone this repository anywhere on your machine:</p>
- <pre><code class="language-bash">git clone https://github.com/laradock/laradock.git
- </code></pre>
- <p>Your folder structure should look like this:</p>
- <pre><code>+ laradock
- + project-z
- </code></pre>
- <p>2 - Edit your web server sites configuration.</p>
- <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><em>Or you can keep <code>default.conf</code> as it is, and create a separate config <code>my-site.conf</code> file for it.</em></p>
- <p><strong>In case of Apache:</strong> :P</p>
- <p><br></p>
- <blockquote>
- <p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
- </blockquote>
- <p><a name="B"></a></p>
- <h3 id="b-setup-for-multiple-projects">B) Setup for Multiple Projects:</h3>
- <blockquote>
- <p>(Follow these steps if you want a single Docker environment for all your project)</p>
- </blockquote>
- <p>1 - Clone this repository anywhere on your machine (similar to <a href="#A2">Steps A.2. from above</a>):</p>
- <pre><code class="language-bash">git clone https://github.com/laradock/laradock.git
- </code></pre>
- <p>Your folder structure should look like this:</p>
- <pre><code>+ laradock
- + project-1
- + project-2
- </code></pre>
- <p>2 - Go to <code>nginx/sites</code> and create config files to point to different project directory when visiting different domains.</p>
- <p>Laradock by default includes <code>project-1.conf</code> and <code>project-2.conf</code> as working samples.</p>
- <p>3 - change the default names <code>project-n</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>
- <p>4 - Add the domains to the <strong>hosts</strong> files.</p>
- <pre><code>127.0.0.1 project-1.dev
- 127.0.0.1 project-2.dev
- </code></pre>
- <blockquote>
- <p><strong>Now jump to the <a href="#Usage">Usage</a> section.</strong></p>
- </blockquote>
- <p><a name="Usage"></a></p>
- <h2 id="usage">Usage</h2>
- <p><strong>Read Before starting:</strong></p>
- <p>If you are using <strong>Docker Toolbox</strong> (VM), do one of the following:</p>
- <ul>
- <li>Upgrade to Docker <a href="https://www.docker.com/products/docker">Native</a> for Mac/Windows (Recommended). Check out <a href="http://laradock.io/documentation/#upgrading-laradock">Upgrading Laradock</a></li>
- <li>Use Laradock v3.*. Visit the <a href="https://github.com/laradock/laradock/tree/LaraDock-ToolBox">LaraDock-ToolBox</a> branch. <em>(outdated)</em></li>
- </ul>
- <p><br></p>
- <blockquote>
- <p><strong>Warning:</strong> If you used an older version of Laradock it&rsquo;s highly recommended to rebuild the containers you need to use <a href="#Build-Re-build-Containers">see how you rebuild a container</a> in order to prevent as much errors as possible.</p>
- </blockquote>
- <p><br></p>
- <p>1 - Enter the laradock folder and rename <code>env-example</code> to <code>.env</code></p>
- <pre><code class="language-shell">cp env-example .env
- </code></pre>
- <p>You can edit the <code>.env</code> file to chose which software&rsquo;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>
- <p>In this example we&rsquo;ll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:</p>
- <pre><code class="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&rsquo;t find them running then you need specify them as follow: <code>docker-compose up -d nginx php-fpm mysql workspace</code>.</p>
- <p>You can select your own combination of containers form the list below:</p>
- <blockquote>
- <p><code>nginx</code>, <code>hhvm</code>, <code>php-fpm</code>, <code>mysql</code>, <code>redis</code>, <code>postgres</code>, <code>mariadb</code>, <code>neo4j</code>, <code>mongo</code>, <code>apache2</code>, <code>caddy</code>, <code>memcached</code>, <code>beanstalkd</code>, <code>beanstalkd-console</code>, <code>rabbitmq</code>, <code>beanstalkd-console</code>, <code>workspace</code>, <code>phpmyadmin</code>, <code>adminer</code>, <code>aerospike</code>, <code>pgadmin</code>, <code>elasticsearch</code>, <code>rethinkdb</code>, <code>postgres-postgis</code>, <code>certbot</code>, <code>mailhog</code>, <code>minio</code> and more&hellip;!</p>
- </blockquote>
- <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><br>
- 3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, &hellip;)</p>
- <pre><code class="language-bash">docker-compose exec workspace bash
- </code></pre>
- <p><em>Alternatively, for Windows PowerShell users: execute the following command to enter any running container:</em></p>
- <pre><code class="language-bash">docker exec -it {workspace-container-id} bash
- </code></pre>
- <p><strong>Note:</strong> You can add <code>--user=laradock</code> to have files created as your host&rsquo;s user. Example:</p>
- <pre><code class="language-shell">docker-compose exec --user=laradock workspace bash
- </code></pre>
- <p><em>You can change the PUID (User id) and PGID (group id) variables from the <code>.env</code> file)</em></p>
- <p><br>
- 4 - Update your project configurations to use the database host</p>
- <p>Open your PHP project&rsquo;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>
- <pre><code class="language-env">DB_HOST=mysql
- </code></pre>
- <p><em>If you want to install Laravel as PHP project, see <a href="#Install-Laravel">How to Install Laravel in a Docker Container</a>.</em></p>
- <p><br>
- 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&rsquo;t</p>
- </description>
- </item>
-
- </channel>
- </rss>
|