deploy: badb1e89cd
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<!doctype html><html class=no-js><head lang=en-us><meta charset=utf-8><meta name=viewport content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1"><meta http-equiv=x-ua-compatible content="IE=10"><title>Getting Started - Laradock</title><meta name=generator content="Hugo 0.55.0"><meta name=description content="Full PHP development environment for Docker."><link rel=canonical href=https://laradock.io/getting-started/><meta name=author content="Mahmoud Zalt"><meta property=og:url content=https://laradock.io/getting-started/><meta property=og:type content=website><meta property=og:site_name content=Laradock><meta property=og:description content="Full PHP development environment for Docker."><meta property=og:title content=Laradock><meta property=og:image content=https://laradock.io/images/favicons/ms-icon-310x310.png><meta name=twitter:card content=summary><meta name=twitter:site content=@Mahmoud_Zalt><meta name=twitter:title content=Laradock><meta name=twitter:description content="Full PHP development environment for Docker."><meta name=twitter:image content=https://laradock.io/images/favicons/ms-icon-310x310.png><meta name=apple-mobile-web-app-title content=Laradock><meta name=apple-mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-status-bar-style content=black-translucent><link rel="shortcut icon" type=image/x-icon href=https://laradock.io/images/favicons/favicon.ico><link rel=icon type=image/x-icon href=https://laradock.io/images/favicons/favicon.ico><link rel=apple-touch-icon sizes=57x57 href=images/favicons/apple-icon-57x57.png><link rel=apple-touch-icon sizes=60x60 href=images/favicons/apple-icon-60x60.png><link rel=apple-touch-icon sizes=72x72 href=images/favicons/apple-icon-72x72.png><link rel=apple-touch-icon sizes=76x76 href=images/favicons/apple-icon-76x76.png><link rel=apple-touch-icon sizes=114x114 href=images/favicons/apple-icon-114x114.png><link rel=apple-touch-icon sizes=120x120 href=images/favicons/apple-icon-120x120.png><link rel=apple-touch-icon sizes=144x144 href=images/favicons/apple-icon-144x144.png><link rel=apple-touch-icon sizes=152x152 href=images/favicons/apple-icon-152x152.png><link rel=apple-touch-icon sizes=180x180 href=images/favicons/apple-icon-180x180.png><link rel=manifest href=images/favicons/manifest.json><meta name=msapplication-TileColor content=#7e57c2><meta name=msapplication-TileImage content=images/favicons/ms-icon-144x144.png><meta name=theme-color content=#7e57c2><style>@font-face{font-family:icon;src:url(https://laradock.io/fonts/icon.eot);src:url(https://laradock.io/fonts/icon.eot) format('embedded-opentype'),url(https://laradock.io/fonts/icon.woff) format('woff'),url(https://laradock.io/fonts/icon.ttf) format('truetype'),url(https://laradock.io/fonts/icon.svg) format('svg');font-weight:400;font-style:normal}</style><link rel=stylesheet href=https://laradock.io/stylesheets/application.css><link rel=stylesheet href=https://laradock.io/stylesheets/temporary.css><link rel=stylesheet href=https://laradock.io/stylesheets/palettes.css><link rel=stylesheet href=https://laradock.io/stylesheets/highlight/highlight.css><link rel=stylesheet href="//fonts.googleapis.com/css?family=Doctarine:400,700|Source+Code+Pro"><style>body,input{font-family:doctarine,Helvetica,Arial,sans-serif}pre,code{font-family:source code pro,courier new,courier,monospace}</style><link rel=stylesheet href=https://laradock.io/custom-style.css><script src=https://laradock.io/javascripts/modernizr.js></script></head><body class="palette-primary-deep-purple palette-accent-purple"><div class=backdrop><div class=backdrop-paper></div></div><input class=toggle type=checkbox id=toggle-drawer>
|
||||
<input class=toggle type=checkbox id=toggle-search>
|
||||
<label class="toggle-button overlay" for=toggle-drawer></label><header class=header><nav aria-label=Header><div class="bar default"><div class="button button-menu" role=button aria-label=Menu><label class="toggle-button icon icon-menu" for=toggle-drawer><span></span></label></div><div class=stretch><div class=title><b>Laradock</b> <span style=color:rgba(249,245,255,.63)>/ Getting Started</span></div></div><div class="button button-github" role=button aria-label=GitHub><a style=padding:0;font-size:40px href=https://github.com/laradock/laradock title="@laradock/laradock on GitHub" target=_blank class="toggle-button icon icon-github"></a></div></div><div class="bar search"><div class="button button-close" role=button aria-label=Close><label class="toggle-button icon icon-back" for=toggle-search></label></div><div class=stretch><div class=field><input class=query type=text placeholder=Search autocapitalize=off autocorrect=off autocomplete=off spellcheck></div></div><div class="button button-reset" role=button aria-label=Search><button class="toggle-button icon icon-close" id=reset-search></button></div></div></nav></header><main class=main><div class=drawer><nav aria-label=Navigation><a href=https://github.com/laradock/laradock class=project><div class=banner><div class=logo><img src=https://laradock.io/images/favicons/ms-icon-310x310.png></div></div></a><div class=scrollable><div class=wrapper><div class=toc><ul><li><a title=Introduction href=https://laradock.io/introduction/>Introduction</a></li><li><a class=current title="Getting Started" href=https://laradock.io/getting-started/>Getting Started</a><ul id=scrollspy></ul></li><li><a title=Documentation href=https://laradock.io/documentation/>Documentation</a></li><li><a title="Help & Questions" href=https://laradock.io/help/>Help & Questions</a></li><li><a title="Related Projects" href=https://laradock.io/related-projects/>Related Projects</a></li><li><a title=Contributions href=https://laradock.io/contributing/>Contributions</a></li></ul><br><br><div><script async src=//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js></script><ins class=adsbygoogle style=display:inline-block;width:237px;height:600px data-ad-client=ca-pub-9826129398689742 data-ad-slot=9891442983></ins><script>(adsbygoogle=window.adsbygoogle||[]).push({});</script></div><br><br></div></div></div></nav></div><article class=article><div class=wrapper><h1>Getting Started</h1><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> [ >= 17.12 ]</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’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
|
||||
<label class="toggle-button overlay" for=toggle-drawer></label><header class=header><nav aria-label=Header><div class="bar default"><div class="button button-menu" role=button aria-label=Menu><label class="toggle-button icon icon-menu" for=toggle-drawer><span></span></label></div><div class=stretch><div class=title><b>Laradock</b> <span style=color:rgba(249,245,255,.63)>/ Getting Started</span></div></div><div class="button button-github" role=button aria-label=GitHub><a style=padding:0;font-size:40px href=https://github.com/laradock/laradock title="@laradock/laradock on GitHub" target=_blank class="toggle-button icon icon-github"></a></div></div><div class="bar search"><div class="button button-close" role=button aria-label=Close><label class="toggle-button icon icon-back" for=toggle-search></label></div><div class=stretch><div class=field><input class=query type=text placeholder=Search autocapitalize=off autocorrect=off autocomplete=off spellcheck></div></div><div class="button button-reset" role=button aria-label=Search><button class="toggle-button icon icon-close" id=reset-search></button></div></div></nav></header><main class=main><div class=drawer><nav aria-label=Navigation><a href=https://github.com/laradock/laradock class=project><div class=banner><div class=logo><img src=https://laradock.io/images/favicons/ms-icon-310x310.png></div></div></a><div class=scrollable><div class=wrapper><div class=toc><ul><li><a title=Introduction href=https://laradock.io/introduction/>Introduction</a></li><li><a class=current title="Getting Started" href=https://laradock.io/getting-started/>Getting Started</a><ul id=scrollspy></ul></li><li><a title=Documentation href=https://laradock.io/documentation/>Documentation</a></li><li><a title="Help & Questions" href=https://laradock.io/help/>Help & Questions</a></li><li><a title="Related Projects" href=https://laradock.io/related-projects/>Related Projects</a></li><li><a title=Contributions href=https://laradock.io/contributing/>Contributions</a></li></ul><br><br><div><script async src=//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js></script><ins class=adsbygoogle style=display:inline-block;width:237px;height:600px data-ad-client=ca-pub-9826129398689742 data-ad-slot=9891442983></ins><script>(adsbygoogle=window.adsbygoogle||[]).push({});</script></div><br><br></div></div></div></nav></div><article class=article><div class=wrapper><h1>Getting Started</h1><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-desktop/>Docker</a> [ >= 19.03.0 ]</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’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>Note: If you are not using Git yet for your project, you can use <code>git clone</code> instead of <code>git submodule</code>.</p><p><em>To keep track of your Laradock changes, between your projects and also keep Laradock updated <a href=https://laradock.io/documentation/#track-your-laradock-changes>check these docs</a></em></p><p>2 - Make sure your folder structure should look like this:</p><pre><code>* project-a
|
||||
* laradock-a
|
||||
* project-b
|
||||
@@ -18,7 +18,7 @@
|
||||
</code></pre><p>2 - Go to your web server and create config files to point to different project directory when visiting different domains:</p><p>For <strong>Nginx</strong> go to <code>nginx/sites</code>, for <strong>Apache2</strong> <code>apache2/sites</code>.</p><p>Laradock by default includes some sample files for you to copy <code>app.conf.example</code>, <code>laravel.conf.example</code> and <code>symfony.conf.example</code>.</p><p>3 - change the default names <code>*.conf</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.test
|
||||
127.0.0.1 project-2.test
|
||||
...
|
||||
</code></pre><p>If you use Chrome 63 or above for development, don’t use <code>.dev</code>. <a href=https://laravel-news.com/chrome-63-now-forces-dev-domains-https>Why?</a>. Instead use <code>.localhost</code>, <code>.invalid</code>, <code>.test</code>, or <code>.example</code>.</p><p>4 - Go to the <a href=#Usage>Usage</a> section.</p><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=https://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><p>We recommend using a Docker version which is newer than 1.13.</p><p><br></p><blockquote><p><strong>Warning:</strong> If you used an older version of Laradock it’s highly recommended to rebuild the containers you need to use <a href=https://laradock.io/documentation/#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 copy <code>.env.example</code> to <code>.env</code></p><pre><code class=language-shell>cp .env.example .env
|
||||
</code></pre><p>If you use Chrome 63 or above for development, don’t use <code>.dev</code>. <a href=https://laravel-news.com/chrome-63-now-forces-dev-domains-https>Why?</a>. Instead use <code>.localhost</code>, <code>.invalid</code>, <code>.test</code>, or <code>.example</code>.</p><p>4 - Go to the <a href=#Usage>Usage</a> section.</p><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 <a href=https://www.docker.com/products/docker-desktop/>Docker Desktop</a> for Mac/Windows (Recommended). Check out <a href=https://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><p>We recommend using a Docker Engine version which is newer than 19.03.0.</p><p><br></p><blockquote><p><strong>Warning:</strong> If you used an older version of Laradock it’s highly recommended to rebuild the containers you need to use <a href=https://laradock.io/documentation/#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 copy <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 choose 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 being used.</p><p>Depending on the host’s operating system you may need to change the value given to <code>COMPOSE_FILE</code>. When you are running Laradock on Mac OS the correct file separator to use is <code>:</code>. When running Laradock from a Windows environment multiple files must be separated with <code>;</code>.</p><p>By default the containers that will be created have the current directory name as suffix (e.g. <code>laradock_workspace_1</code>). This can cause mixture of data inside the container volumes if you use laradock in multiple projects. In this case, either read the guide for <a href=#B>multiple projects</a> or change the variable <code>COMPOSE_PROJECT_NAME</code> to something unique like your project name.</p><p>2 - Build the environment and run it using <code>docker-compose</code></p><p>In this example we’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>: All the web server containers <code>nginx</code>, <code>apache</code> ..etc depends on <code>php-fpm</code>, which means if you run any of them, they will automatically launch the <code>php-fpm</code> container for you, so no need to explicitly specify it in the <code>up</code> command. If you have to do so, you may need to run them as follows: <code>docker-compose up -d nginx php-fpm mysql</code>.</p><p>You can select your own combination of containers from <a href=http://laradock.io/introduction/#supported-software-images>this list</a>.</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><br>3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, …)</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
|
||||
|
||||
@@ -112,7 +112,7 @@ The container name <code>{container-name}</code> is the same as its folder name.
|
||||
<a href=https://opencollective.com/laradock/tiers/bronze-sponsors/56/website target=_blank><img src="https://opencollective.com/laradock/tiers/bronze-sponsors/56/avatar.svg?button=false&isActive=true" height=55px></a>
|
||||
<a href=https://opencollective.com/laradock/tiers/bronze-sponsors/57/website target=_blank><img src="https://opencollective.com/laradock/tiers/bronze-sponsors/57/avatar.svg?button=false&isActive=true" height=55px></a>
|
||||
<a href=https://opencollective.com/laradock/tiers/bronze-sponsors/58/website target=_blank><img src="https://opencollective.com/laradock/tiers/bronze-sponsors/58/avatar.svg?button=false&isActive=true" height=55px></a>
|
||||
<a href=https://opencollective.com/laradock/tiers/bronze-sponsors/59/website target=_blank><img src="https://opencollective.com/laradock/tiers/bronze-sponsors/59/avatar.svg?button=false&isActive=true" height=55px></a></p><p>You can sponsor us using any of the methods below:</p><p><b>1:</b> Sponsor via <a href=https://opencollective.com/laradock/>Open Collective</a>.<br><b>2:</b> Email us at <a href="mailto: support@laradock.io">support@laradock.io</a>.</p><p><em>Sponsors logos are displayed on the <a href=https://github.com/laradock/laradock/>github repository</a> page and the <a href=http://laradock.io/>documentation website</a> home page.</em></p><h2 id=license>License</h2><p><a href=https://github.com/laradock/laradock/blob/master/LICENSE>MIT</a> © Mahmoud Zalt</p><p><br></p><br><br><br><br><br><br><hr><br><h1>Getting Started</h1><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> [ >= 17.12 ]</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’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
|
||||
<a href=https://opencollective.com/laradock/tiers/bronze-sponsors/59/website target=_blank><img src="https://opencollective.com/laradock/tiers/bronze-sponsors/59/avatar.svg?button=false&isActive=true" height=55px></a></p><p>You can sponsor us using any of the methods below:</p><p><b>1:</b> Sponsor via <a href=https://opencollective.com/laradock/>Open Collective</a>.<br><b>2:</b> Email us at <a href="mailto: support@laradock.io">support@laradock.io</a>.</p><p><em>Sponsors logos are displayed on the <a href=https://github.com/laradock/laradock/>github repository</a> page and the <a href=http://laradock.io/>documentation website</a> home page.</em></p><h2 id=license>License</h2><p><a href=https://github.com/laradock/laradock/blob/master/LICENSE>MIT</a> © Mahmoud Zalt</p><p><br></p><br><br><br><br><br><br><hr><br><h1>Getting Started</h1><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-desktop/>Docker</a> [ >= 19.03.0 ]</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’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>Note: If you are not using Git yet for your project, you can use <code>git clone</code> instead of <code>git submodule</code>.</p><p><em>To keep track of your Laradock changes, between your projects and also keep Laradock updated <a href=https://laradock.io/documentation/#track-your-laradock-changes>check these docs</a></em></p><p>2 - Make sure your folder structure should look like this:</p><pre><code>* project-a
|
||||
* laradock-a
|
||||
* project-b
|
||||
@@ -130,7 +130,7 @@ The container name <code>{container-name}</code> is the same as its folder name.
|
||||
</code></pre><p>2 - Go to your web server and create config files to point to different project directory when visiting different domains:</p><p>For <strong>Nginx</strong> go to <code>nginx/sites</code>, for <strong>Apache2</strong> <code>apache2/sites</code>.</p><p>Laradock by default includes some sample files for you to copy <code>app.conf.example</code>, <code>laravel.conf.example</code> and <code>symfony.conf.example</code>.</p><p>3 - change the default names <code>*.conf</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.test
|
||||
127.0.0.1 project-2.test
|
||||
...
|
||||
</code></pre><p>If you use Chrome 63 or above for development, don’t use <code>.dev</code>. <a href=https://laravel-news.com/chrome-63-now-forces-dev-domains-https>Why?</a>. Instead use <code>.localhost</code>, <code>.invalid</code>, <code>.test</code>, or <code>.example</code>.</p><p>4 - Go to the <a href=#Usage>Usage</a> section.</p><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=https://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><p>We recommend using a Docker version which is newer than 1.13.</p><p><br></p><blockquote><p><strong>Warning:</strong> If you used an older version of Laradock it’s highly recommended to rebuild the containers you need to use <a href=https://laradock.io/documentation/#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 copy <code>.env.example</code> to <code>.env</code></p><pre><code class=language-shell>cp .env.example .env
|
||||
</code></pre><p>If you use Chrome 63 or above for development, don’t use <code>.dev</code>. <a href=https://laravel-news.com/chrome-63-now-forces-dev-domains-https>Why?</a>. Instead use <code>.localhost</code>, <code>.invalid</code>, <code>.test</code>, or <code>.example</code>.</p><p>4 - Go to the <a href=#Usage>Usage</a> section.</p><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 <a href=https://www.docker.com/products/docker-desktop/>Docker Desktop</a> for Mac/Windows (Recommended). Check out <a href=https://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><p>We recommend using a Docker Engine version which is newer than 19.03.0.</p><p><br></p><blockquote><p><strong>Warning:</strong> If you used an older version of Laradock it’s highly recommended to rebuild the containers you need to use <a href=https://laradock.io/documentation/#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 copy <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 choose 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 being used.</p><p>Depending on the host’s operating system you may need to change the value given to <code>COMPOSE_FILE</code>. When you are running Laradock on Mac OS the correct file separator to use is <code>:</code>. When running Laradock from a Windows environment multiple files must be separated with <code>;</code>.</p><p>By default the containers that will be created have the current directory name as suffix (e.g. <code>laradock_workspace_1</code>). This can cause mixture of data inside the container volumes if you use laradock in multiple projects. In this case, either read the guide for <a href=#B>multiple projects</a> or change the variable <code>COMPOSE_PROJECT_NAME</code> to something unique like your project name.</p><p>2 - Build the environment and run it using <code>docker-compose</code></p><p>In this example we’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>: All the web server containers <code>nginx</code>, <code>apache</code> ..etc depends on <code>php-fpm</code>, which means if you run any of them, they will automatically launch the <code>php-fpm</code> container for you, so no need to explicitly specify it in the <code>up</code> command. If you have to do so, you may need to run them as follows: <code>docker-compose up -d nginx php-fpm mysql</code>.</p><p>You can select your own combination of containers from <a href=http://laradock.io/introduction/#supported-software-images>this list</a>.</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><br>3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, …)</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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Laradock</title><link>https://laradock.io/</link><description>Recent content on Laradock</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><atom:link href="https://laradock.io/index.xml" rel="self" type="application/rss+xml"/><item><title>Introduction</title><link>https://laradock.io/introduction/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://laradock.io/introduction/</guid><description>Laradock is a full PHP development environment for Docker.
|
||||
It supports a variety of common services, all pre-configured to provide a ready PHP development environment.
|
||||
Use Docker First - Learn About It Later!
|
||||
Features Easy switch between PHP versions: 8.1, 8.0, 7.4, 7.3, 7.2, 7.1, 5.6&hellip; Choose your favorite database engine: MySQL, Postgres, MariaDB&hellip; Run your own stack: Memcached, HHVM, RabbitMQ&hellip; Each software runs on its own container: PHP-FPM, NGINX, PHP-CLI&hellip; Easy to customize any container, with simple edits to the Dockerfile.</description></item><item><title>Getting Started</title><link>https://laradock.io/getting-started/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://laradock.io/getting-started/</guid><description>Requirements Git Docker [ &gt;= 17.12 ] Installation Choose the setup the best suits your needs.
|
||||
Features Easy switch between PHP versions: 8.1, 8.0, 7.4, 7.3, 7.2, 7.1, 5.6&hellip; Choose your favorite database engine: MySQL, Postgres, MariaDB&hellip; Run your own stack: Memcached, HHVM, RabbitMQ&hellip; Each software runs on its own container: PHP-FPM, NGINX, PHP-CLI&hellip; Easy to customize any container, with simple edits to the Dockerfile.</description></item><item><title>Getting Started</title><link>https://laradock.io/getting-started/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://laradock.io/getting-started/</guid><description>Requirements Git Docker [ &gt;= 19.03.0 ] Installation Choose the setup the best suits your needs.
|
||||
A) Setup for Single Project A.1) Already have a PHP project A.2) Don&rsquo;t have a PHP project yet B) Setup for Multiple Projects
|
||||
A) Setup for Single Project (Follow these steps if you want a separate Docker environment for each project)
|
||||
A.1) Already have a PHP project: 1 - Clone laradock on your project root directory:</description></item><item><title>Documentation</title><link>https://laradock.io/documentation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://laradock.io/documentation/</guid><description>List current running Containers docker ps You can also use the following command if you want to see only this project containers:
|
||||
|
||||
Reference in New Issue
Block a user