|
@@ -270,10 +270,10 @@ QUEUE_HOST=beanstalkd
|
|
|
|
|
|
<p>Your folder structure should look like this:</p>
|
|
|
|
|
|
-<pre><code>- project-A
|
|
|
- - laradock-A
|
|
|
-- project-B
|
|
|
- - laradock-B
|
|
|
+<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>
|
|
@@ -293,56 +293,57 @@ QUEUE_HOST=beanstalkd
|
|
|
|
|
|
<p>Your folder structure should look like this:</p>
|
|
|
|
|
|
-<pre><code>- laradock
|
|
|
-- Project-Z
|
|
|
+<pre><code>+ laradock
|
|
|
++ project-z
|
|
|
</code></pre>
|
|
|
|
|
|
-<p>2 - Edit the <code>docker-compose.yml</code> file to map to your project directory once you have it (example: <code>- ../Project-Z:/var/www</code>).</p>
|
|
|
+<p>2 - Edit your web server sites configuration.</p>
|
|
|
|
|
|
-<p>3 - Stop and re-run your docker-compose command for the changes to take place.</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>
|
|
|
|
|
|
-<pre><code>docker-compose stop &amp;&amp; docker-compose up -d XXXX YYYY ZZZZ ....
|
|
|
-</code></pre>
|
|
|
+<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>3 - Run your <code>docker-compose up</code> command and you&rsquo;re ready to go.</p>
|
|
|
+
|
|
|
+<p><em>Note: if you already had your containers up, you might need to take them down first and rebuild them for the changes to take effect.</em></p>
|
|
|
|
|
|
<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 project)</p>
|
|
|
+<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:</p>
|
|
|
+<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>2 - Edit the <code>docker-compose.yml</code> (or the <code>.env</code>) file to map to your projects directories:</p>
|
|
|
+<p>Your folder structure should look like this:</p>
|
|
|
|
|
|
-<pre><code> applications:
|
|
|
- volumes:
|
|
|
- - ../project1/:/var/www/project1
|
|
|
- - ../project2/:/var/www/project2
|
|
|
+<pre><code>+ laradock
|
|
|
++ project-1
|
|
|
++ project-2
|
|
|
</code></pre>
|
|
|
|
|
|
-<p>3 - You can access all sites by visiting <code>http://localhost/project1/public</code> and <code>http://localhost/project2/public</code> but of course that&rsquo;s not very useful so let&rsquo;s setup NGINX quickly.</p>
|
|
|
+<p>2 - Go to <code>nginx/sites</code> and create config files to point to different project directory when visiting different domains.</p>
|
|
|
|
|
|
-<p>4 - Go to <code>nginx/sites</code> and copy <code>sample.conf.example</code> to <code>project1.conf</code> then to <code>project2.conf</code></p>
|
|
|
+<p>Laradock by default includes <code>project-1.conf</code> and <code>project-2.conf</code> as working samples.</p>
|
|
|
|
|
|
-<p>5 - Open the <code>project1.conf</code> file and edit the <code>server_name</code> and the <code>root</code> as follow:</p>
|
|
|
-
|
|
|
-<pre><code> server_name project1.dev;
|
|
|
- root /var/www/project1/public;
|
|
|
-</code></pre>
|
|
|
+<p>3 - change the default names <code>project-n</code>:</p>
|
|
|
|
|
|
-<p>Do the same for each project <code>project2.conf</code>, <code>project3.conf</code>,&hellip;</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>6 - Add the domains to the <strong>hosts</strong> files.</p>
|
|
|
+<p>4 - Add the domains to the <strong>hosts</strong> files.</p>
|
|
|
|
|
|
-<pre><code>127.0.0.1 project1.dev
|
|
|
+<pre><code>127.0.0.1 project-1.dev
|
|
|
+127.0.0.1 project-2.dev
|
|
|
</code></pre>
|
|
|
|
|
|
-<p>7 - Create your project Databases. Right now you have to do it manually by entering your DB container, until we automate it soon.</p>
|
|
|
+<p>5 - Visit <code>http://project-1.dev/</code> and <code>http://project-2.dev/</code>.</p>
|
|
|
|
|
|
<h2 id="usage">Usage</h2>
|
|
|
|