<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Daniel Polito</title>
    <description>The latest articles on DEV Community by Daniel Polito (@dbpolito).</description>
    <link>https://dev.to/dbpolito</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F647913%2F201fb59a-a8cb-4f08-ab36-01313ed144e3.jpeg</url>
      <title>DEV Community: Daniel Polito</title>
      <link>https://dev.to/dbpolito</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dbpolito"/>
    <language>en</language>
    <item>
      <title>The Kool Way to Run Hugo Static Sites on Docker</title>
      <dc:creator>Daniel Polito</dc:creator>
      <pubDate>Tue, 27 Jul 2021 16:02:53 +0000</pubDate>
      <link>https://dev.to/kooldev/the-kool-way-to-run-hugo-static-sites-on-docker-3k04</link>
      <guid>https://dev.to/kooldev/the-kool-way-to-run-hugo-static-sites-on-docker-3k04</guid>
      <description>&lt;p&gt;In just 2 simple steps, you can use &lt;a href="https://github.com/kool-dev/kool" rel="noopener noreferrer"&gt;&lt;strong&gt;Kool&lt;/strong&gt;&lt;/a&gt; to start a new &lt;strong&gt;Hugo&lt;/strong&gt; application running in a local Docker development environment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Kool&lt;/strong&gt; is a free, open source CLI tool that makes local development with Docker super easy. Kool CLI will level up your development workflow, and help you and your team improve the way you develop and deploy cloud native applications.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;If you haven't done so already, you first need to &lt;a href="https://kool.dev/docs/getting-started/installation" rel="noopener noreferrer"&gt;install Docker and the Kool CLI&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you already have &lt;code&gt;kool&lt;/code&gt; installed, make sure you're running the latest version with &lt;code&gt;kool self-update&lt;/code&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Step 1 – Create a New Hugo Application
&lt;/h2&gt;

&lt;p&gt;Use the &lt;a href="https://kool.dev/docs/commands/kool-create" rel="noopener noreferrer"&gt;&lt;code&gt;kool create&lt;/code&gt; command&lt;/a&gt; to create your new Hugo project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kool create hugo my-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;IMPORTANT: if you're on &lt;strong&gt;Windows WSL&lt;/strong&gt; or &lt;strong&gt;Linux&lt;/strong&gt;, you should run &lt;code&gt;sudo kool create hugo my-project&lt;/code&gt; as the superuser (via &lt;code&gt;sudo&lt;/code&gt;) to avoid permissions issues when creating the project directory and files.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Under the hood, this command will run &lt;code&gt;kool docker klakegg/hugo:ext-alpine new site my-project&lt;/code&gt; using the &lt;a href="https://hub.docker.com/r/klakegg/hugo/" rel="noopener noreferrer"&gt;klakegg/hugo&lt;/a&gt; Docker image.&lt;/p&gt;

&lt;p&gt;Now, move into your new Hugo project:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;my-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;After installing Hugo, &lt;code&gt;kool create&lt;/code&gt; automatically runs the &lt;a href="https://kool.dev/docs/commands/kool-preset" rel="noopener noreferrer"&gt;&lt;code&gt;kool preset hugo&lt;/code&gt; command&lt;/a&gt;, which auto-generates the following configuration files and adds them to your project. As your project evolves, you can easily modify and extend these files to suit your needs.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gi"&gt;+docker-compose.yml
+kool.yml
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Step 2 – Start Your Local Environment
&lt;/h2&gt;

&lt;p&gt;As mentioned above, the &lt;a href="https://kool.dev/docs/commands/kool-preset" rel="noopener noreferrer"&gt;&lt;code&gt;kool preset&lt;/code&gt; command&lt;/a&gt; added a &lt;strong&gt;kool.yml&lt;/strong&gt; file to your project. To help get you started, &lt;strong&gt;kool.yml&lt;/strong&gt; comes prebuilt with an initial set of scripts based on your chosen framework and stack. Since Hugo requires a few extra steps to create a Hello World site, &lt;strong&gt;kool.yml&lt;/strong&gt; includes a special &lt;code&gt;quickstart&lt;/code&gt; script to make it super easy.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Think of &lt;strong&gt;kool.yml&lt;/strong&gt; as an easy-to-use task &lt;em&gt;helper&lt;/em&gt;. Instead of writing custom shell scripts, add your own scripts to &lt;strong&gt;kool.yml&lt;/strong&gt; (under the &lt;code&gt;scripts&lt;/code&gt; key), and run them with &lt;code&gt;kool run SCRIPT&lt;/code&gt; (e.g. &lt;code&gt;kool run hugo&lt;/code&gt;). You can add your own single line commands (see &lt;code&gt;hugo&lt;/code&gt; below), or add a list of commands that will be executed in sequence (see &lt;code&gt;quickstart&lt;/code&gt; below).&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;scripts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;hugo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kool docker -p 1313:1313 klakegg/hugo:ext-alpine&lt;/span&gt;
    &lt;span class="na"&gt;dev&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kool run hugo server -D&lt;/span&gt;

    &lt;span class="c1"&gt;# remove or modify to suit the needs of your project&lt;/span&gt;
    &lt;span class="na"&gt;quickstart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;kool start&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;git init&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;echo theme = \"ananke\" &amp;gt;&amp;gt; config.toml&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;kool run hugo new posts/my-first-post.md&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;kool run dev&lt;/span&gt;

    &lt;span class="na"&gt;setup&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;kool start&lt;/span&gt;
        &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;kool run dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Go ahead and run &lt;code&gt;kool run quickstart&lt;/code&gt; to start your Docker environment and initialize your Hugo site.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kool run quickstart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;As you can see in &lt;strong&gt;kool.yml&lt;/strong&gt;, the &lt;code&gt;quickstart&lt;/code&gt; script does the following in sequence: runs the &lt;code&gt;kool start&lt;/code&gt; command to spin up your Docker environment; calls &lt;code&gt;git init&lt;/code&gt; to create a Git repository; downloads the Ananke theme; uses an &lt;code&gt;echo&lt;/code&gt; command to add the theme to your Hugo config file; adds your first post; and then calls &lt;code&gt;kool run dev&lt;/code&gt; to build your Hugo site.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's it!&lt;/p&gt;

&lt;p&gt;Once &lt;code&gt;kool run quickstart&lt;/code&gt; finishes, you should be able to access your new site at &lt;a href="http://localhost/" rel="noopener noreferrer"&gt;http://localhost&lt;/a&gt; and see the "My New Hugo Site" page. Hooray!&lt;/p&gt;



&lt;p&gt;Verify your Docker service containers are running using the &lt;a href="https://dev.to/docs/commands/kool-status"&gt;&lt;code&gt;kool status&lt;/code&gt; command&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kool status
+---------+---------+------------------------------+--------------+
| SERVICE | RUNNING | PORTS                        | STATE        |
+---------+---------+------------------------------+--------------+
| app     | Running | 0.0.0.0:80-&amp;gt;80/tcp, 1313/tcp | Up 2 minutes |
| static  | Running | 80/tcp                       | Up 2 minutes |
+---------+---------+------------------------------+--------------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Run &lt;code&gt;kool logs app&lt;/code&gt; to see the logs from your running &lt;code&gt;app&lt;/code&gt; container.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Use &lt;code&gt;kool logs&lt;/code&gt; to see the logs from all running containers. Add the &lt;code&gt;-f&lt;/code&gt; option after &lt;code&gt;kool logs&lt;/code&gt; to follow the logs (i.e. &lt;code&gt;kool logs -f app&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kool logs app
Attaching to my-project_app_1
app_1     |   Non-page files   |  0
app_1     |   Static files     |  0
app_1     |   Processed images |  0
app_1     |   Aliases          |  0
app_1     |   Sitemaps         |  1
app_1     |   Cleaned          |  0
app_1     |
app_1     | Built &lt;span class="k"&gt;in &lt;/span&gt;1 ms
app_1     | Watching &lt;span class="k"&gt;for &lt;/span&gt;changes &lt;span class="k"&gt;in&lt;/span&gt; /app/&lt;span class="o"&gt;{&lt;/span&gt;archetypes,content,data,layouts,static&lt;span class="o"&gt;}&lt;/span&gt;
app_1     | Watching &lt;span class="k"&gt;for &lt;/span&gt;config changes &lt;span class="k"&gt;in&lt;/span&gt; /app/config.toml
app_1     | Environment: &lt;span class="s2"&gt;"DEV"&lt;/span&gt;
app_1     | Serving pages from memory
app_1     | Running &lt;span class="k"&gt;in &lt;/span&gt;Fast Render Mode. For full rebuilds on change: hugo server &lt;span class="nt"&gt;--disableFastRender&lt;/span&gt;
app_1     | Web Server is available at http://localhost:80/ &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;bind &lt;/span&gt;address 0.0.0.0&lt;span class="o"&gt;)&lt;/span&gt;
app_1     | Press Ctrl+C to stop
app_1     |
app_1     | Change of config file detected, rebuilding site.
app_1     | 2021-05-01 20:34:06.306 +0000
app_1     | Rebuilt &lt;span class="k"&gt;in &lt;/span&gt;136 ms
app_1     | adding created directory to watchlist /app/content/posts
app_1     |
app_1     | Change detected, rebuilding site.
app_1     | 2021-05-01 20:34:07.305 +0000
app_1     | Source changed &lt;span class="s2"&gt;"/app/content/posts/my-first-post.md"&lt;/span&gt;: CREATE
app_1     | Total &lt;span class="k"&gt;in &lt;/span&gt;26 ms
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;When it's time to stop working on the project:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kool stop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;When you're ready to start coding again:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;kool start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;If you like what we're doing, show your support for this new open source project by &lt;a href="https://github.com/kool-dev/kool" rel="noopener noreferrer"&gt;&lt;strong&gt;starring us on GitHub&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Level Up Your Development Workflow
&lt;/h2&gt;

&lt;p&gt;Once you're up and running with your new Hugo project, you can use the &lt;code&gt;kool&lt;/code&gt; CLI to level up your development workflow. &lt;a href="https://kool.dev/docs/getting-started/how-it-works#better-development-workflow" rel="noopener noreferrer"&gt;Learn more in "How It Works"&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Support the Kool Open Source Project
&lt;/h2&gt;

&lt;p&gt;Kool is open source and totally free to use. If you're interested in learning more about the project, please check out &lt;a href="https://kool.dev" rel="noopener noreferrer"&gt;kool.dev&lt;/a&gt;. If you have questions, need support, or want to get involved, please &lt;a href="https://kool.dev/slack" rel="noopener noreferrer"&gt;join our Slack channel&lt;/a&gt;.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kool-dev" rel="noopener noreferrer"&gt;
        kool-dev
      &lt;/a&gt; / &lt;a href="https://github.com/kool-dev/kool" rel="noopener noreferrer"&gt;
        kool
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      From local development to the cloud: web apps development with containers made easy.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;a href="https://kool.dev" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2c9a131304755404c25d798a79d45732e52881150dd6b8ce7ccdf3043c061bce/68747470733a2f2f6b6f6f6c2e6465762f696d672f6c6f676f2e706e67" width="400" alt="kool - cloud native dev tool"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://goreportcard.com/report/github.com/kool-dev/kool" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/41d1a6a1552a124ad859772350dca69e3f7a76608052b2724afb96ced4f1def9/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f6b6f6f6c2d6465762f6b6f6f6c" alt="Go Report Card"&gt;&lt;/a&gt;
&lt;a href="https://codecov.io/gh/kool-dev/kool" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/21e096501f8e71afebf9b32021095c59ef40e8e2e70128960e2dc65f5fdea8ee/68747470733a2f2f636f6465636f762e696f2f67682f6b6f6f6c2d6465762f6b6f6f6c2f6272616e63682f6d61696e2f67726170682f62616467652e737667" alt="codecov"&gt;&lt;/a&gt;
&lt;a href="https://github.com/kool-dev/kool/workflows/docker" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/kool-dev/kool/workflows/docker/badge.svg" alt="Docker Hub"&gt;&lt;/a&gt;
&lt;a href="https://github.com/kool-dev/kool/workflows/golangci-lint" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/kool-dev/kool/workflows/golangci-lint/badge.svg" alt="Golang CI Lint"&gt;&lt;/a&gt;
&lt;a href="https://codeclimate.com/github/kool-dev/kool/maintainability" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/734f5b6dd1cda2d34c0b7242f1e323282c3fb4d86af53c36f35dda3ae01692ff/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31353131663832366465393264326162333963632f6d61696e7461696e6162696c697479" alt="Maintainability"&gt;&lt;/a&gt;
&lt;a href="https://kool.dev/slack" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/24c53943c966db565633b087e876c58b7f572a6b9df694d4295fa5c9f79636fb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4a6f696e253230536c61636b2d6b6f6f6c2d2d6465762d6f72616e67653f6c6f676f3d736c61636b" alt="Join Slack Kool community"&gt;&lt;/a&gt;
&lt;a href="https://github.com/sindresorhus/awesome" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8693bde04030b1670d5097703441005eba34240c32d1df1eb82a5f0d6716518e/68747470733a2f2f63646e2e7261776769742e636f6d2f73696e647265736f726875732f617765736f6d652f643733303566333864323966656437386661383536353265336136336531353464643865383832392f6d656469612f62616467652e737667" alt="Awesome"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;About &lt;code&gt;kool&lt;/code&gt;
&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Kool&lt;/strong&gt; is a CLI tool that brings the complexities of modern software development environments down to earth - making these environments lightweight, fast and reproducible. It reduces the complexity and learning curve of &lt;em&gt;Docker&lt;/em&gt; containers for local environments, and offers a simplified interface for using &lt;em&gt;Kubernetes&lt;/em&gt; to deploy staging and production environments to the cloud.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kool&lt;/strong&gt; gets your local development environment up and running easily and quickly, so you have more time to build a great application. When the time is right, you can then use Kool.dev Cloud to deploy and share your work with the world!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kool&lt;/strong&gt; is suitable for solo developers and teams of all sizes. It provides a hassle-free way to handle the Docker basics and immediately start using containers for development, while simultaneously guaranteeing no loss of control over more specialized Docker environments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://kool.dev" rel="nofollow noopener noreferrer"&gt;Learn more at kool.dev&lt;/a&gt;.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Installation&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;Requirements: Kool is powered by…&lt;/p&gt;
&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kool-dev/kool" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


</description>
      <category>hugo</category>
      <category>docker</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Running NestJS on Docker is Really Easy with Kool</title>
      <dc:creator>Daniel Polito</dc:creator>
      <pubDate>Mon, 19 Jul 2021 20:33:49 +0000</pubDate>
      <link>https://dev.to/kooldev/running-nestjs-on-docker-is-really-easy-with-kool-5b8m</link>
      <guid>https://dev.to/kooldev/running-nestjs-on-docker-is-really-easy-with-kool-5b8m</guid>
      <description>&lt;p&gt;In just 3 simple steps, you can use &lt;a href="https://github.com/kool-dev/kool" rel="noopener noreferrer"&gt;&lt;strong&gt;Kool&lt;/strong&gt;&lt;/a&gt; to start a new &lt;strong&gt;NestJS&lt;/strong&gt; application running in a local Docker development environment.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Kool&lt;/strong&gt; is a free, open source CLI tool that makes local development with Docker super easy. Kool CLI will level up your development workflow, and help you and your team improve the way you develop and deploy cloud native applications.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Requirements
&lt;/h2&gt;

&lt;p&gt;If you haven't done so already, you first need to &lt;a href="https://kool.dev/docs/getting-started/installation" rel="noopener noreferrer"&gt;install Docker and the Kool CLI&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you already have &lt;code&gt;kool&lt;/code&gt; installed, make sure you're running the latest version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kool self-update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Step 1 – Create a New NestJS Application
&lt;/h2&gt;

&lt;p&gt;Use the &lt;a href="https://kool.dev/docs/commands/kool-create" rel="noopener noreferrer"&gt;&lt;code&gt;kool create&lt;/code&gt; command&lt;/a&gt; to create your new NestJS project.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kool create nestjs my-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Under the hood, this command will run &lt;code&gt;nest new my-project&lt;/code&gt; to install NestJS using a customized Kool Docker Image: &lt;a href="https://github.com/kool-dev/docker-node" rel="noopener noreferrer"&gt;kooldev/node:14-nest&lt;/a&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn more about Kool Docker Images in our article &lt;a href="https://dev.to/kooldev/use-kool-to-dockerize-your-local-development-environment-the-right-way-18gl#kool-docker-images"&gt;"Use Kool to Dockerize Your Local Development Environment the Right Way"&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After installing NestJS, &lt;code&gt;kool create&lt;/code&gt; automatically runs the &lt;a href="https://kool.dev/docs/commands/kool-preset" rel="noopener noreferrer"&gt;&lt;code&gt;kool preset nestjs&lt;/code&gt; command&lt;/a&gt;, which helps you set up the initial tech stack for your project using an interactive wizard.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Preset nestjs is initializing!
&lt;span class="go"&gt;
? Which database service do you want to use [Use arrows to move, type to filter]
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MySQL 8.0
&lt;span class="go"&gt;  MySQL 5.7
  PostgreSQL 13.0
  none

? Which cache service do you want to use [Use arrows to move, type to filter]
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Redis 6.0
&lt;span class="go"&gt;  Memcached 1.6
  none

? Which package manager did you choose during Nest setup [Use arrows to move, type to filter]
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;npm
&lt;span class="go"&gt;  yarn

&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Preset nestjs initialized!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now, move into your new NestJS project:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;my-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The &lt;code&gt;kool preset&lt;/code&gt; command auto-generated the following configuration files and added them to your project, which you can easily modify and extend to suit your needs.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gi"&gt;+docker-compose.yml
+kool.yml
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Step 2 (Optional) – Add Environment Variables
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;You can skip this step if you did &lt;em&gt;not&lt;/em&gt; add a database or cache service to your project via the wizard.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you added a database and/or cache service, you'll need to add some local environment variables to match the services in your &lt;strong&gt;docker-compose.yml&lt;/strong&gt; file (see below). For example, you'll need to change the hosts from &lt;em&gt;localhost&lt;/em&gt; to the appropriate service container name, which are accessible from within Docker.&lt;/p&gt;

&lt;p&gt;Create a &lt;strong&gt;.env&lt;/strong&gt; file inside your project's root directory, and add the appropriate environment variables to this file (as provided below) based on the services used in your project.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Learn more about &lt;a href="https://docs.nestjs.com/techniques/configuration" rel="noopener noreferrer"&gt;how to configure NestJS&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Database Services
&lt;/h3&gt;

&lt;p&gt;MySQL 5.7 and 8.0&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gi"&gt;+DB_CONNECTION=mysql
+DB_HOST=database
+DB_DATABASE=&amp;lt;some_database_name&amp;gt;
+DB_USERNAME=&amp;lt;some_username&amp;gt;
+DB_PASSWORD=&amp;lt;some_password&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;PostgreSQL 13.0&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gi"&gt;+DB_CONNECTION=pgsql
+DB_HOST=database
+DB_PORT=5432
+DB_DATABASE=&amp;lt;some_database_name&amp;gt;
+DB_USERNAME=&amp;lt;some_username&amp;gt;
+DB_PASSWORD=&amp;lt;some_password&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Cache Services
&lt;/h3&gt;

&lt;p&gt;Redis&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gi"&gt;+REDIS_HOST=cache
+REDIS_PORT=6379
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Memcached&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gi"&gt;+MEMCACHED_HOST=cache
+MEMCACHED_PORT=11211
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Step 3 – Start Your Local Environment
&lt;/h2&gt;

&lt;p&gt;Now, spin up your local environment for the first time using the &lt;code&gt;setup&lt;/code&gt; script in your &lt;strong&gt;kool.yml&lt;/strong&gt; file:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kool run setup
&lt;span class="go"&gt;
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 879 packages in 32.143s

78 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Creating network "my-project_kool_local" with the default driver
Creating volume "my-project_database" with default driver
Creating volume "my-project_cache" with default driver
Creating my-project_database_1 ... done
Creating my-project_app_1      ... done
Creating my-project_cache_1    ... done
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;That's it!&lt;/p&gt;

&lt;p&gt;Once &lt;code&gt;kool run setup&lt;/code&gt; finishes, you can access your new NestJS app at &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt; and see the NestJS "Hello World!" welcome page.&lt;/p&gt;
&lt;h2&gt;
  
  
  Level Up Your Workflow
&lt;/h2&gt;

&lt;p&gt;Now that you have your new NestJS app up and running, you can use the Kool CLI to start leveling up your development workflow.&lt;/p&gt;
&lt;h3&gt;
  
  
  Add Scripts to kool.yml
&lt;/h3&gt;

&lt;p&gt;Think of &lt;strong&gt;kool.yml&lt;/strong&gt; as a super easy-to-use task helper. Instead of writing custom shell scripts, you can add your own scripts to &lt;strong&gt;kool.yml&lt;/strong&gt; (under the &lt;code&gt;scripts&lt;/code&gt; key), and run them with &lt;code&gt;kool run SCRIPT&lt;/code&gt;. You can add single line commands (&lt;code&gt;kool run nest&lt;/code&gt;), or add a list of commands that will be executed in sequence (&lt;code&gt;kool run setup&lt;/code&gt;). For example, add scripts to run database migrations, reset local environments, run static analysis tools, and so on. &lt;strong&gt;Think about how much easier it will be to onboard a teammate or new developer :)&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;scripts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;mysql&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kool exec -e MYSQL_PWD=$DB_PASSWORD database mysql -u $DB_USERNAME $DB_DATABASE&lt;/span&gt; &lt;span class="c1"&gt;# or psql for PostgreSQL&lt;/span&gt;
  &lt;span class="na"&gt;nest&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kool exec app nest&lt;/span&gt;
  &lt;span class="na"&gt;npm&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kool exec app npm&lt;/span&gt; &lt;span class="c1"&gt;# or yarn&lt;/span&gt;
  &lt;span class="na"&gt;npx&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kool exec app npx&lt;/span&gt;

  &lt;span class="na"&gt;setup&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;kool docker kooldev/node:14 npm install&lt;/span&gt; &lt;span class="c1"&gt;# or yarn install&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;kool start&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Run Commands
&lt;/h3&gt;

&lt;p&gt;When you need to execute a command inside a running service container, use the &lt;a href="https://kool.dev/docs/commands/kool-exec" rel="noopener noreferrer"&gt;&lt;code&gt;kool exec&lt;/code&gt; command&lt;/a&gt;. Run the following to check the version of Node running in your &lt;code&gt;app&lt;/code&gt; container.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kool &lt;span class="nb"&gt;exec &lt;/span&gt;app node &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;span class="go"&gt;
v14.17.1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Connect to the Database
&lt;/h3&gt;

&lt;p&gt;If you added a database service, start a new SQL client session inside your running &lt;code&gt;database&lt;/code&gt; container by executing &lt;code&gt;kool run mysql&lt;/code&gt; (MySQL) or &lt;code&gt;kool run psql&lt;/code&gt; (PostgreSQL). This runs the &lt;code&gt;mysql&lt;/code&gt; or &lt;code&gt;psql&lt;/code&gt; script in your &lt;strong&gt;kool.yml&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Add Dependencies
&lt;/h3&gt;

&lt;p&gt;As your project evolves, and you add more dependencies to &lt;code&gt;package.json&lt;/code&gt;, use the &lt;a href="https://kool.dev/docs/commands/kool-restart" rel="noopener noreferrer"&gt;&lt;code&gt;kool restart&lt;/code&gt; command&lt;/a&gt; to restart your &lt;code&gt;app&lt;/code&gt; container and load the new packages.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kool restart app
&lt;span class="go"&gt;
Stopping my-project_app_1 ... done
Going to remove my-project_app_1
Removing my-project_app_1 ... done
Creating my-project_app_1 ... done
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  View the Logs
&lt;/h3&gt;

&lt;p&gt;View container logs using the &lt;a href="https://kool.dev/docs/commands/kool-logs" rel="noopener noreferrer"&gt;&lt;code&gt;kool logs&lt;/code&gt; command&lt;/a&gt;. Run &lt;code&gt;kool logs&lt;/code&gt; to see the logs for all running containers, or &lt;code&gt;kool logs app&lt;/code&gt; to specify a service and only see the logs for the &lt;code&gt;app&lt;/code&gt; container. Add the &lt;code&gt;-f&lt;/code&gt; option after &lt;code&gt;kool logs&lt;/code&gt; to follow the logs (i.e. &lt;code&gt;kool logs -f app&lt;/code&gt;).&lt;/p&gt;
&lt;h3&gt;
  
  
  Share Your Work
&lt;/h3&gt;

&lt;p&gt;When you need to quickly share local changes with your team, use the &lt;a href="https://kool.dev/docs/commands/kool-share" rel="noopener noreferrer"&gt;&lt;code&gt;kool share&lt;/code&gt; command&lt;/a&gt; to share your local environment over the Internet via an HTTP tunnel. Specify your own subdomain using the &lt;code&gt;--subdomain&lt;/code&gt; flag.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kool share &lt;span class="nt"&gt;--port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3000
&lt;span class="go"&gt;
Thank you for using expose.
Local-URL:     app:3000
Dashboard-URL: http://127.0.0.1:4040
Expose-URL:    https://eeskzijcbe.kool.live

Remaining time: 00:59:59
Remaining time: 00:59:58
Remaining time: 00:59:57
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Switch Projects
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Kool&lt;/strong&gt; supports any language or framework, so you can standardize the way you work across all your tech stacks. When it's time to stop working on your new NestJS app and switch to a different project, you can easily change local Docker environments by running &lt;code&gt;kool stop&lt;/code&gt; on the NestJS project, moving into the other project directory, and running &lt;code&gt;kool start&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kool stop
&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/my-other-project
&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kool start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Pretty kool, right?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you like what we're doing, show your support for this new open source project by &lt;a href="https://github.com/kool-dev/kool" rel="noopener noreferrer"&gt;&lt;strong&gt;starring us on GitHub&lt;/strong&gt;&lt;/a&gt;!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Dive Deeper
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://kool.dev/docs/presets/nestjs" rel="noopener noreferrer"&gt;Read the docs for our NestJS Preset&lt;/a&gt; to learn more about using Kool with NestJS.&lt;/li&gt;
&lt;li&gt;Check out the &lt;a href="https://kool.dev/docs/presets/nestjs" rel="noopener noreferrer"&gt;Kool Presets&lt;/a&gt; for other popular frameworks.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kool.dev" rel="noopener noreferrer"&gt;Go to kool.dev&lt;/a&gt; to learn more about the Kool open source project.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kool-dev" rel="noopener noreferrer"&gt;
        kool-dev
      &lt;/a&gt; / &lt;a href="https://github.com/kool-dev/kool" rel="noopener noreferrer"&gt;
        kool
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      From local development to the cloud: web apps development with containers made easy.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;a href="https://kool.dev" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2c9a131304755404c25d798a79d45732e52881150dd6b8ce7ccdf3043c061bce/68747470733a2f2f6b6f6f6c2e6465762f696d672f6c6f676f2e706e67" width="400" alt="kool - cloud native dev tool"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://goreportcard.com/report/github.com/kool-dev/kool" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/41d1a6a1552a124ad859772350dca69e3f7a76608052b2724afb96ced4f1def9/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f6b6f6f6c2d6465762f6b6f6f6c" alt="Go Report Card"&gt;&lt;/a&gt;
&lt;a href="https://codecov.io/gh/kool-dev/kool" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/21e096501f8e71afebf9b32021095c59ef40e8e2e70128960e2dc65f5fdea8ee/68747470733a2f2f636f6465636f762e696f2f67682f6b6f6f6c2d6465762f6b6f6f6c2f6272616e63682f6d61696e2f67726170682f62616467652e737667" alt="codecov"&gt;&lt;/a&gt;
&lt;a href="https://github.com/kool-dev/kool/workflows/docker" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/kool-dev/kool/workflows/docker/badge.svg" alt="Docker Hub"&gt;&lt;/a&gt;
&lt;a href="https://github.com/kool-dev/kool/workflows/golangci-lint" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/kool-dev/kool/workflows/golangci-lint/badge.svg" alt="Golang CI Lint"&gt;&lt;/a&gt;
&lt;a href="https://codeclimate.com/github/kool-dev/kool/maintainability" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/734f5b6dd1cda2d34c0b7242f1e323282c3fb4d86af53c36f35dda3ae01692ff/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31353131663832366465393264326162333963632f6d61696e7461696e6162696c697479" alt="Maintainability"&gt;&lt;/a&gt;
&lt;a href="https://kool.dev/slack" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/24c53943c966db565633b087e876c58b7f572a6b9df694d4295fa5c9f79636fb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4a6f696e253230536c61636b2d6b6f6f6c2d2d6465762d6f72616e67653f6c6f676f3d736c61636b" alt="Join Slack Kool community"&gt;&lt;/a&gt;
&lt;a href="https://github.com/sindresorhus/awesome" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8693bde04030b1670d5097703441005eba34240c32d1df1eb82a5f0d6716518e/68747470733a2f2f63646e2e7261776769742e636f6d2f73696e647265736f726875732f617765736f6d652f643733303566333864323966656437386661383536353265336136336531353464643865383832392f6d656469612f62616467652e737667" alt="Awesome"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;About &lt;code&gt;kool&lt;/code&gt;
&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Kool&lt;/strong&gt; is a CLI tool that brings the complexities of modern software development environments down to earth - making these environments lightweight, fast and reproducible. It reduces the complexity and learning curve of &lt;em&gt;Docker&lt;/em&gt; containers for local environments, and offers a simplified interface for using &lt;em&gt;Kubernetes&lt;/em&gt; to deploy staging and production environments to the cloud.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kool&lt;/strong&gt; gets your local development environment up and running easily and quickly, so you have more time to build a great application. When the time is right, you can then use Kool.dev Cloud to deploy and share your work with the world!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kool&lt;/strong&gt; is suitable for solo developers and teams of all sizes. It provides a hassle-free way to handle the Docker basics and immediately start using containers for development, while simultaneously guaranteeing no loss of control over more specialized Docker environments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://kool.dev" rel="nofollow noopener noreferrer"&gt;Learn more at kool.dev&lt;/a&gt;.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Installation&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;Requirements: Kool is powered by…&lt;/p&gt;
&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kool-dev/kool" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


</description>
      <category>nestjs</category>
      <category>javascript</category>
      <category>docker</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Running Laravel on Docker is really easy with Kool</title>
      <dc:creator>Daniel Polito</dc:creator>
      <pubDate>Tue, 22 Jun 2021 18:31:04 +0000</pubDate>
      <link>https://dev.to/kooldev/running-laravel-on-docker-is-really-easy-with-kool-400h</link>
      <guid>https://dev.to/kooldev/running-laravel-on-docker-is-really-easy-with-kool-400h</guid>
      <description>&lt;p&gt;In just 3 simple steps, you can use &lt;strong&gt;Kool CLI's&lt;/strong&gt; &lt;a href="https://kool.dev/docs/commands/kool-create" rel="noopener noreferrer"&gt;&lt;code&gt;kool create&lt;/code&gt;&lt;/a&gt; command to start a new Laravel application running in a local Docker environment. &lt;a href="https://kool.dev" rel="noopener noreferrer"&gt;Kool&lt;/a&gt; is an open source dev tool that makes using Docker for local development a lot easier.&lt;/p&gt;

&lt;p&gt;Before you start, if you haven't done so already, you need to &lt;a href="https://kool.dev/docs/getting-started/installation" rel="noopener noreferrer"&gt;install Docker and &lt;strong&gt;Kool CLI&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Create a new Laravel application
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kool create laravel my-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;This command may take a minute or two to complete while &lt;a href="https://getcomposer.org/" rel="noopener noreferrer"&gt;Composer&lt;/a&gt; downloads Laravel's vendor dependencies. After installing Laravel, &lt;code&gt;kool create&lt;/code&gt; automatically runs the &lt;a href="https://kool.dev/docs/commands/kool-preset" rel="noopener noreferrer"&gt;&lt;code&gt;kool preset laravel&lt;/code&gt;&lt;/a&gt; command, which helps you set up your project's development environment using an interactive wizard.&lt;/p&gt;
&lt;h3&gt;
  
  
  PHP
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;? What app service do you want to use  [Use arrows to move, type to filter]
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;PHP 8.0
&lt;span class="go"&gt;  PHP 7.4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Database
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;? What database service do you want to use  [Use arrows to move, type to filter]
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;MySQL 8.0
&lt;span class="go"&gt;  MySQL 5.7
  MariaDB 10.5
  PostgreSQL 13.0
  none
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Cache
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;? What cache service do you want to use  [Use arrows to move, type to filter]
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Redis 6.0
&lt;span class="go"&gt;  Memcached 1.6
  none
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Package Manager
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;? What javascript package manager do you want to use  [Use arrows to move, type to filter]
  npm
&lt;/span&gt;&lt;span class="gp"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;yarn
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;




&lt;p&gt;After selecting your preferences, the latest version of Laravel will be installed and ready for you in your &lt;code&gt;my-project&lt;/code&gt; folder, along with your new &lt;code&gt;kool&lt;/code&gt; environment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmiifgrnahvz6jjl69xnn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmiifgrnahvz6jjl69xnn.png" alt="kool preset laravel - output"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Move into your new Laravel project:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;my-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The &lt;code&gt;kool preset&lt;/code&gt; command auto-generated the following configuration files and added them to your project, which you can modify and extend.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gi"&gt;+docker-compose.yml
+kool.yml
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  2. Update &lt;code&gt;.env.example&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Next, we need to make a few tweaks to the default &lt;strong&gt;.env.example&lt;/strong&gt; file that ships with Laravel in order to match the services in your &lt;strong&gt;docker-compose.yml&lt;/strong&gt; file. For example, we need to change the hosts from &lt;em&gt;localhost&lt;/em&gt; to the appropriate service container name, which are accessible from within Docker.&lt;/p&gt;
&lt;h3&gt;
  
  
  Database Services
&lt;/h3&gt;

&lt;p&gt;MySQL 5.7 and 8.0 / MariaDB 10.5&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;-DB_HOST=127.0.0.1
&lt;/span&gt;&lt;span class="gi"&gt;+DB_HOST=database
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;PostgreSQL 13.0&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;-DB_CONNECTION=mysql
&lt;/span&gt;&lt;span class="gi"&gt;+DB_CONNECTION=pgsql
&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;span class="gd"&gt;-DB_HOST=127.0.0.1
&lt;/span&gt;&lt;span class="gi"&gt;+DB_HOST=database
&lt;/span&gt;&lt;span class="err"&gt;
&lt;/span&gt;&lt;span class="gd"&gt;-DB_PORT=3306
&lt;/span&gt;&lt;span class="gi"&gt;+DB_PORT=5432
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Cache Services
&lt;/h3&gt;

&lt;p&gt;Redis&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;-REDIS_HOST=127.0.0.1
&lt;/span&gt;&lt;span class="gi"&gt;+REDIS_HOST=cache
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Memcached&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;-MEMCACHED_HOST=127.0.0.1
&lt;/span&gt;&lt;span class="gi"&gt;+MEMCACHED_HOST=cache
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  3. Run &lt;code&gt;kool run setup&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Now, spin up your local environment for the first time using the &lt;code&gt;setup&lt;/code&gt; script in your &lt;strong&gt;kool.yml&lt;/strong&gt; file:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kool run setup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: if you're running this command for the first time, Docker may need to download all the container images that are being used, which can take a few minutes, depending on your internet connection.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's it!&lt;/p&gt;

&lt;p&gt;After &lt;code&gt;kool run setup&lt;/code&gt; has finished, you can access your new Laravel app at &lt;a href="http://localhost" rel="noopener noreferrer"&gt;http://localhost&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;kool run setup
&lt;span class="go"&gt;
Creating network "my-project_kool_local" with the default driver
Creating volume "my-project_database" with default driver
Creating volume "my-project_cache" with default driver
Creating my-project_cache_1    ... done
Creating my-project_app_1      ... done
Creating my-project_database_1 ... done
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu9wrpikyu5gfr1gpy603.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu9wrpikyu5gfr1gpy603.png" alt="kool laravel welcome screen"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Dive Deeper
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://kool.dev/docs/presets/laravel" rel="noopener noreferrer"&gt;Read the docs for our Laravel Preset&lt;/a&gt; to learn more about using Kool with Laravel.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://kool.dev" rel="noopener noreferrer"&gt;Go to kool.dev&lt;/a&gt; to learn more about the Kool open source project.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/kool-dev" rel="noopener noreferrer"&gt;
        kool-dev
      &lt;/a&gt; / &lt;a href="https://github.com/kool-dev/kool" rel="noopener noreferrer"&gt;
        kool
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      From local development to the cloud: web apps development with containers made easy.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;a href="https://kool.dev" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/2c9a131304755404c25d798a79d45732e52881150dd6b8ce7ccdf3043c061bce/68747470733a2f2f6b6f6f6c2e6465762f696d672f6c6f676f2e706e67" width="400" alt="kool - cloud native dev tool"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a href="https://goreportcard.com/report/github.com/kool-dev/kool" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/41d1a6a1552a124ad859772350dca69e3f7a76608052b2724afb96ced4f1def9/68747470733a2f2f676f7265706f7274636172642e636f6d2f62616467652f6769746875622e636f6d2f6b6f6f6c2d6465762f6b6f6f6c" alt="Go Report Card"&gt;&lt;/a&gt;
&lt;a href="https://codecov.io/gh/kool-dev/kool" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/21e096501f8e71afebf9b32021095c59ef40e8e2e70128960e2dc65f5fdea8ee/68747470733a2f2f636f6465636f762e696f2f67682f6b6f6f6c2d6465762f6b6f6f6c2f6272616e63682f6d61696e2f67726170682f62616467652e737667" alt="codecov"&gt;&lt;/a&gt;
&lt;a href="https://github.com/kool-dev/kool/workflows/docker" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/kool-dev/kool/workflows/docker/badge.svg" alt="Docker Hub"&gt;&lt;/a&gt;
&lt;a href="https://github.com/kool-dev/kool/workflows/golangci-lint" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/kool-dev/kool/workflows/golangci-lint/badge.svg" alt="Golang CI Lint"&gt;&lt;/a&gt;
&lt;a href="https://codeclimate.com/github/kool-dev/kool/maintainability" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/734f5b6dd1cda2d34c0b7242f1e323282c3fb4d86af53c36f35dda3ae01692ff/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f31353131663832366465393264326162333963632f6d61696e7461696e6162696c697479" alt="Maintainability"&gt;&lt;/a&gt;
&lt;a href="https://kool.dev/slack" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/24c53943c966db565633b087e876c58b7f572a6b9df694d4295fa5c9f79636fb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4a6f696e253230536c61636b2d6b6f6f6c2d2d6465762d6f72616e67653f6c6f676f3d736c61636b" alt="Join Slack Kool community"&gt;&lt;/a&gt;
&lt;a href="https://github.com/sindresorhus/awesome" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8693bde04030b1670d5097703441005eba34240c32d1df1eb82a5f0d6716518e/68747470733a2f2f63646e2e7261776769742e636f6d2f73696e647265736f726875732f617765736f6d652f643733303566333864323966656437386661383536353265336136336531353464643865383832392f6d656469612f62616467652e737667" alt="Awesome"&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;About &lt;code&gt;kool&lt;/code&gt;
&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Kool&lt;/strong&gt; is a CLI tool that brings the complexities of modern software development environments down to earth - making these environments lightweight, fast and reproducible. It reduces the complexity and learning curve of &lt;em&gt;Docker&lt;/em&gt; containers for local environments, and offers a simplified interface for using &lt;em&gt;Kubernetes&lt;/em&gt; to deploy staging and production environments to the cloud.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kool&lt;/strong&gt; gets your local development environment up and running easily and quickly, so you have more time to build a great application. When the time is right, you can then use Kool.dev Cloud to deploy and share your work with the world!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Kool&lt;/strong&gt; is suitable for solo developers and teams of all sizes. It provides a hassle-free way to handle the Docker basics and immediately start using containers for development, while simultaneously guaranteeing no loss of control over more specialized Docker environments.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://kool.dev" rel="nofollow noopener noreferrer"&gt;Learn more at kool.dev&lt;/a&gt;.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Installation&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;Requirements: Kool is powered by…&lt;/p&gt;
&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/kool-dev/kool" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


</description>
      <category>laravel</category>
      <category>docker</category>
      <category>opensource</category>
      <category>kool</category>
    </item>
  </channel>
</rss>
