<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Nicolas B.</title>
    <subtitle>Nicolas B., Ruby Backend Developer</subtitle>
    <link rel="self" type="application/atom+xml" href="https://nicolas-brousse.fr/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://nicolas-brousse.fr"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-05-23T00:00:00+00:00</updated>
    <id>https://nicolas-brousse.fr/atom.xml</id>
    <entry xml:lang="en">
        <title>Rack web profiler, first release</title>
        <published>2017-01-05T00:00:00+00:00</published>
        <updated>2017-01-05T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Nicolas B.
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nicolas-brousse.fr/articles/2017-01-05-rack-web-profiler-first-release/"/>
        <id>https://nicolas-brousse.fr/articles/2017-01-05-rack-web-profiler-first-release/</id>
        
        <content type="html" xml:base="https://nicolas-brousse.fr/articles/2017-01-05-rack-web-profiler-first-release/">&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.d24274c63f336b3d.jpg&quot; alt=&quot;&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.d24274c63f336b3d.jpg&quot;
     width=&quot;1280&quot; height=&quot;512&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.905700c61bd5ac91.jpg 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.80a8b9609a1cb72f.jpg 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.79cb51623f09ab39.jpg 1280w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.7662f681c5f218d5.jpg 1920w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;p&gt;It’s been more than a year since I introduced one of my projects named Rack Web Profiler.&lt;&#x2F;p&gt;
&lt;p&gt;These last months I worked to stabilise, clean the project and also export the part linked to Rails onto a separate gem.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;why-this-gem&quot;&gt;Why this gem&lt;a class=&quot;post-anchor&quot; href=&quot;#why-this-gem&quot; aria-label=&quot;Anchor link for: why-this-gem&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;I know there is existing tools to develop and debug Rack and Rails applications like the gem &lt;code&gt;rack-miniprofiler&lt;&#x2F;code&gt;. But they have some elements missing to allow customisation and easy extension.&lt;br &#x2F;&gt;
That’s why I started creating this gem.&lt;&#x2F;p&gt;
&lt;p&gt;With Rack Web Profiler you have the ability to create custom collectors by using its DSL. It allows you to collect informations then show them on the bar and the panel.
All datas collected are stored in an SQLite database so you have access to the requests history.&lt;&#x2F;p&gt;
&lt;p&gt;For now these two gems are just bases but it could be something more in the future.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;ui-preview&quot;&gt;UI preview&lt;a class=&quot;post-anchor&quot; href=&quot;#ui-preview&quot; aria-label=&quot;Anchor link for: ui-preview&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;I worked with &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;thomasdecicco.me&quot;&gt;Thomas De Cicco&lt;&#x2F;a&gt; a digital designer on the UI of the profiler. We tried together to have something light, simple and readable.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;the-bar&quot;&gt;The bar&lt;a class=&quot;post-anchor&quot; href=&quot;#the-bar&quot; aria-label=&quot;Anchor link for: the-bar&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;It gives you quick informations about the current request. By clicking an element you can access more informations on the panel.&lt;&#x2F;p&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;bar.232ef3050c4b5d42.png&quot; alt=&quot;Bar&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;bar.232ef3050c4b5d42.png&quot;
     width=&quot;1280&quot; height=&quot;850&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;bar.87e22354245cf2df.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;bar.658c4402a8447cad.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;bar.24a819cbd74b7154.png 1280w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;bar.472c3c9206a69349.png 1920w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;h3 id=&quot;the-panel&quot;&gt;The panel&lt;a class=&quot;post-anchor&quot; href=&quot;#the-panel&quot; aria-label=&quot;Anchor link for: the-panel&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;It shows you collectors details for a captured request.&lt;br &#x2F;&gt;
You also have a page that gives you the previous requests.&lt;&#x2F;p&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;panel.5178283c3eba433e.png&quot; alt=&quot;Panel&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;panel.5178283c3eba433e.png&quot;
     width=&quot;1280&quot; height=&quot;850&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;panel.a088e06431c6fdb9.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;panel.626bb3207f0d69bc.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;panel.f58f5386f70180f7.png 1280w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;panel.206715c49b33af28.png 1920w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;h2 id=&quot;how-to-use-it&quot;&gt;How to use it&lt;a class=&quot;post-anchor&quot; href=&quot;#how-to-use-it&quot; aria-label=&quot;Anchor link for: how-to-use-it&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;I worked to have something which works with as less configuration as possible. But the gem will come with the possibility of having some options to configure it as you like.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;rack-rack-webprofiler&quot;&gt;Rack → &lt;code&gt;rack-webprofiler&lt;&#x2F;code&gt;&lt;a class=&quot;post-anchor&quot; href=&quot;#rack-rack-webprofiler&quot; aria-label=&quot;Anchor link for: rack-rack-webprofiler&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;With &lt;code&gt;rack&lt;&#x2F;code&gt; you need to add the profiler in the middleware like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;home&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt; lambda&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;_env&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;  [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;200&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;Content-Type&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;text&#x2F;html&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; }&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;Hello world!&amp;lt;&#x2F;body&amp;gt;&amp;lt;&#x2F;html&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span&gt;builder&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; Rack&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;Builder&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;new&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;  use &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;Rack&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;  map&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; {&lt;&#x2F;span&gt;&lt;span&gt; run home &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span&gt;run builder&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;By default it will use &lt;code&gt;Dir.tmpdir&lt;&#x2F;code&gt; to define the temporary directory (place where the database is created). You could configure it by using the &lt;code&gt;tmp_dir:&lt;&#x2F;code&gt; option.&lt;&#x2F;p&gt;
&lt;p&gt;To see more you can go to the &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rack-webprofiler&#x2F;rack-webprofiler&quot;&gt;GitHub&lt;&#x2F;a&gt; project.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;rails-rails-webprofiler&quot;&gt;Rails → &lt;code&gt;rails-webprofiler&lt;&#x2F;code&gt;&lt;a class=&quot;post-anchor&quot; href=&quot;#rails-rails-webprofiler&quot; aria-label=&quot;Anchor link for: rails-rails-webprofiler&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;For Rails the gem only contains specific collectors. It includes the &lt;code&gt;rack-webprofiler&lt;&#x2F;code&gt; gem to have the bar and panel.
It uses Railtie to automatically load the profiler in the middleware. So you only have to add one gem to the Gemfile as following:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Gemfile&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span&gt;gem &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;rails-webprofiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;It uses the Rails temporary directory as &lt;code&gt;tmp_dir&lt;&#x2F;code&gt; for the database place.&lt;&#x2F;p&gt;
&lt;p&gt;To see more you can go to the &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rack-webprofiler&#x2F;rails-webprofiler&quot;&gt;GitHub&lt;&#x2F;a&gt; project.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;sinatra&quot;&gt;Sinatra&lt;a class=&quot;post-anchor&quot; href=&quot;#sinatra&quot; aria-label=&quot;Anchor link for: sinatra&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;For now there is nothing for Sinatra but I plan working on a &lt;code&gt;sinatra-webprofiler&lt;&#x2F;code&gt; gem in the future if there are requests.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;how-to-extend-it&quot;&gt;How to extend it&lt;a class=&quot;post-anchor&quot; href=&quot;#how-to-extend-it&quot; aria-label=&quot;Anchor link for: how-to-extend-it&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Like I said I worked to have something extendable easily. I created a DSL with methods to give you access to the tools you needs.&lt;&#x2F;p&gt;
&lt;p&gt;Here is an example of the time collector.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;class&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; TimeCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Just include the DSL.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  include&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; Rack&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;Collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;DSL&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Base64 icon (using svg icon is better).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;  icon &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;lt;&amp;lt;-&amp;#39;ICON&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;data:image&#x2F;svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB3aWR0aD0iMjBweCIgaGVpZ2h0PSIyMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+R3JvdXAgMjwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9IkRlc2t0b3AtMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEwLjAwMDAwMCwgLTE3MC4wMDAwMDApIiBmaWxsPSIjNTg1NDczIj4gICAgICAgICAgICA8ZyBpZD0iUGVyZm9ybWFuY2UiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAuMDAwMDAwLCAxNjAuMDAwMDAwKSI+ICAgICAgICAgICAgICAgIDxnIGlkPSJHcm91cC0yIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMC4wMDAwMDAsIDEwLjAwMDAwMCkiPiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTEwLDE4IEwxMCwxOCBDMTQuNDE4Mjc4LDE4IDE4LDE0LjQxODI3OCAxOCwxMCBDMTgsNS41ODE3MjIgMTQuNDE4Mjc4LDIgMTAsMiBDNS41ODE3MjIsMiAyLDUuNTgxNzIyIDIsMTAgQzIsMTQuNDE4Mjc4IDUuNTgxNzIyLDE4IDEwLDE4IEwxMCwxOCBMMTAsMTggWiBNMCwxMCBDMCw0LjQ3NzE1MjUgNC40NzcxNTI1LDAgMTAsMCBDMTUuNTIyODQ3NSwwIDIwLDQuNDc3MTUyNSAyMCwxMCBDMjAsMTUuNTIyODQ3NSAxNS41MjI4NDc1LDIwIDEwLDIwIEM0LjQ3NzE1MjUsMjAgMCwxNS41MjI4NDc1IDAsMTAgWiIgaWQ9IlNoYXBlIj48L3BhdGg+ICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTQzIiB4PSI5IiB5PSI0IiB3aWR0aD0iMiIgaGVpZ2h0PSI1Ij48L3JlY3Q+ICAgICAgICAgICAgICAgICAgICA8cmVjdCBpZD0iUmVjdGFuZ2xlLTQzLUNvcHkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDE0LjAwMDAwMCwgMTAuMDAwMDAwKSByb3RhdGUoLTI3MC4wMDAwMDApIHRyYW5zbGF0ZSgtMTQuMDAwMDAwLCAtMTAuMDAwMDAwKSAiIHg9IjEzIiB5PSI4IiB3aWR0aD0iMiIgaGVpZ2h0PSI0Ij48L3JlY3Q+ICAgICAgICAgICAgICAgIDwvZz4gICAgICAgICAgICA8L2c+ICAgICAgICA8L2c+ICAgIDwvZz48L3N2Zz4=&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;ICON&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;span&gt;  identifier &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;time&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; identifier is used as database key and in css.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span&gt;  label      &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;Time&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; label is used as text in the panel sidebar.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span&gt;  position   &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;      #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; position of the element in the bar and panel sidebar.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;13&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Collect the data you need to store for the view.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;15&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; You access to the request and response objects (they are not the originals).&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;16&lt;&#x2F;span&gt;&lt;span&gt;  collect &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;request&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; _response&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;17&lt;&#x2F;span&gt;&lt;span&gt;    runtime&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; request&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;ENV_RUNTIME&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; *&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; 1000.0&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;18&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;19&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Store by key the data you need access in the view.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;20&lt;&#x2F;span&gt;&lt;span&gt;    store &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;runtime&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; runtime&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;21&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;22&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; You could set a color status to the bar item.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;23&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Possible values: `:warning`, `:danger`, `:success`&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;24&lt;&#x2F;span&gt;&lt;span&gt;    status &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;warning&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; if&lt;&#x2F;span&gt;&lt;span&gt; runtime &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; 200&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;25&lt;&#x2F;span&gt;&lt;span&gt;    status &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;danger&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  if&lt;&#x2F;span&gt;&lt;span&gt; runtime &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; 1000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;26&lt;&#x2F;span&gt;&lt;span&gt;    &lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;27&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; You could conditionally show or hide panel and bar.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;28&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; By default they are shown if they exist in the view.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;29&lt;&#x2F;span&gt;&lt;span&gt;    show_panel &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;30&lt;&#x2F;span&gt;&lt;span&gt;    show_bar   &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;31&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;32&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;33&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; There is two ways to store the ERB template. Here we store view content&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;34&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; in the same file as the collector.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;35&lt;&#x2F;span&gt;&lt;span&gt;  template &lt;&#x2F;span&gt;&lt;span&gt;__FILE__&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt; type&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; :&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;DATA&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;36&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; But you could put it into a separate file like this:&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;37&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; template &amp;quot;..&#x2F;template_folder&#x2F;template_file.erb&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;38&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;39&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;40&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;__END__&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;41&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;%&lt;&#x2F;span&gt;&lt;span&gt; tab_content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; %&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;42&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;  &amp;lt;%= data(:runtime).round(2) %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; ms&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;43&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; %&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Or if it was in a separate file:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;erb&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;&amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; tab_content block just contains the tab content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span&gt; tab_content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  &amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; use data method to get the values you stored by key &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;  &amp;lt;%=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;runtime&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;round&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span&gt; ms&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;&amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; panel_content block contains the panel content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;&amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; but here we don&amp;#39;t need to show it &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span&gt; panel_content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  &amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Your pretty HTML code &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;After creating the collector, you simply need to register it as following:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;Rack&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;register_collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; TimeCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Registration can’t be done dynamically in your application code. If you don’t always need to show a collector, you have to use the &lt;code&gt;is_enabled?&lt;&#x2F;code&gt; DSL method.&lt;&#x2F;p&gt;
&lt;p&gt;If you need more details, you have a &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rack-webprofiler&#x2F;rack-webprofiler&#x2F;blob&#x2F;master&#x2F;docs&#x2F;DSL.md&quot;&gt;documentation for the DSL&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Voilà, you have your first collector!&lt;&#x2F;p&gt;
&lt;h2 id=&quot;next-steps&quot;&gt;Next steps&lt;a class=&quot;post-anchor&quot; href=&quot;#next-steps&quot; aria-label=&quot;Anchor link for: next-steps&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;The Rack WebProfiler will have some other functionalities in the future. Like being able to toggle the bar, have a search form for the requests list and catch the exceptions to show the informations into the panel.&lt;br &#x2F;&gt;
I also plan to create some other collectors for Rails like I18n, ActiveMailer and ActiveJob collectors.&lt;&#x2F;p&gt;
&lt;p&gt;If you have any feedback, comment or idea of contribution, &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rack-webprofiler&#x2F;rack-webprofiler&#x2F;issues&#x2F;new&quot;&gt;github&lt;&#x2F;a&gt;!&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;Sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rack-webprofiler&#x2F;rack-webprofiler&quot;&gt;Rack WebProfiler GitHub repository&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;rack-webprofiler&#x2F;rails-webprofiler&quot;&gt;Rails WebProfiler GitHub repository&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Use Let&#x27;s Encrypt on GitLab</title>
        <published>2016-05-30T00:00:00+00:00</published>
        <updated>2026-05-23T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Nicolas B.
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nicolas-brousse.fr/articles/2016-05-30-letsencrypt-on-gitlab/"/>
        <id>https://nicolas-brousse.fr/articles/2016-05-30-letsencrypt-on-gitlab/</id>
        
        <content type="html" xml:base="https://nicolas-brousse.fr/articles/2016-05-30-letsencrypt-on-gitlab/">&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.bc33cbff30c91434.jpg&quot; alt=&quot;&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.bc33cbff30c91434.jpg&quot;
     width=&quot;1280&quot; height=&quot;512&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.be49630101452512.jpg 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.80bb597fba51ede0.jpg 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.617981ec50c02724.jpg 1280w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.31b3bee1f0e7284b.jpg 1920w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;blockquote class=&quot;markdown-alert-warning&quot;&gt;
&lt;p&gt;This is directly managed by GitLab since version &lt;code&gt;10.5&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;p&gt;If you have a &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;about.gitlab.com&#x2F;&quot;&gt;GitLab&lt;&#x2F;a&gt; instance and you want to secure it, you could do it for free with &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;letsencrypt.org&#x2F;&quot;&gt;Let’s Encrypt&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;To start if it’s not already the case you need to &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;letsencrypt.org&#x2F;getting-started&#x2F;&quot;&gt;install Let’s Encrypt&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;When installation is done we create an ini file for Let’s Encrypt. It’s more clear than a command line with multiple options.&lt;br &#x2F;&gt;
So create &lt;code&gt;&#x2F;root&#x2F;letsencrypt-config&#x2F;gitlab.ini&lt;&#x2F;code&gt; file.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ini&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Let&amp;#39;s Encrypt config file for GitLab instance&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; register certs with the following email address&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;email&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; hello@MY_DOMAIN&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; standalone authenticator&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;authenticator&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; standalone&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; generate certificates for the specified domains.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;domains&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; gitlab.MY_DOMAIN, mattermost.MY_DOMAIN, registry.MY_DOMAIN&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;12&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;13&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; use a 4096 bit RSA key&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;rsa-key-size&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span&gt; 4096&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We use &lt;code&gt;authenticator = standalone&lt;&#x2F;code&gt; because of GitLab Registry. The Registry can’t be started in &lt;code&gt;http:&#x2F;&#x2F;&lt;&#x2F;code&gt;. So it’s the more easier. But it will need to have &lt;code&gt;nginx&lt;&#x2F;code&gt; down while Let’s Encrypt run.&lt;&#x2F;p&gt;
&lt;p&gt;Now we have to create a small script &lt;code&gt;&#x2F;root&#x2F;letsencrypt-config&#x2F;renew-ssl-certificates.cron&lt;&#x2F;code&gt; to automatically renew certificates by using cron.&lt;br &#x2F;&gt;
The script will stop the GitLab’s &lt;code&gt;nginx&lt;&#x2F;code&gt; server, then call Let’s Encrypt to renew our certificates, then start the &lt;code&gt;nginx&lt;&#x2F;code&gt; server.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EA76CB, #F5C2E7);font-style: italic;&quot;&gt;#!&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EA76CB, #F5C2E7);font-style: italic;&quot;&gt;&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;gitlab-ctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; stop&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; nginx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;&#x2F;usr&#x2F;local&#x2F;bin&#x2F;certbot-auto&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; certonly&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;c&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &#x2F;root&#x2F;letsencrypt-config&#x2F;gitlab.ini&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;-renew-by-default&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;gitlab-ctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; start&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; nginx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then we put the script into &lt;code&gt;cron.monthly&lt;&#x2F;code&gt;. And manually generate certificates the first time.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; chmod&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; +x&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &#x2F;root&#x2F;letsencrypt-config&#x2F;renew-ssl-certificates.cron&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ln&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;s&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &#x2F;root&#x2F;letsencrypt-config&#x2F;renew-ssl-certificates.cron&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &#x2F;etc&#x2F;cron.monthly&#x2F;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Let&amp;#39;s generate the certificates for the first time&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &#x2F;usr&#x2F;local&#x2F;bin&#x2F;certbot-auto&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; certonly&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;c&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &#x2F;root&#x2F;letsencrypt-config&#x2F;gitlab.ini&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;To finish we configure GitLab to have it use the certificates.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span&gt;external_url &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;https:&#x2F;&#x2F;...&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;span&gt;nginx&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;redirect_http_to_https&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span&gt;nginx&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;ssl_certificate&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&#x2F;etc&#x2F;letsencrypt&#x2F;live&#x2F;gitlab.MY_DOMAIN&#x2F;fullchain.pem&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span&gt;nginx&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;ssl_certificate_key&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&#x2F;etc&#x2F;letsencrypt&#x2F;live&#x2F;gitlab.MY_DOMAIN&#x2F;privkey.pem&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;span&gt;mattermost_external_url &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;https:&#x2F;&#x2F;...&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span&gt;mattermost_nginx&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;redirect_http_to_https&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; true&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span&gt;mattermost_nginx&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;ssl_certificate&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&#x2F;etc&#x2F;letsencrypt&#x2F;live&#x2F;gitlab.MY_DOMAIN&#x2F;fullchain.pem&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;13&lt;&#x2F;span&gt;&lt;span&gt;mattermost_nginx&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;ssl_certificate_key&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&#x2F;etc&#x2F;letsencrypt&#x2F;live&#x2F;gitlab.MY_DOMAIN&#x2F;privkey.pem&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;14&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;15&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; ...&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;16&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;17&lt;&#x2F;span&gt;&lt;span&gt;registry_external_url &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;https:&#x2F;&#x2F;...&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;18&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;19&lt;&#x2F;span&gt;&lt;span&gt;registry_nginx&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;ssl_certificate&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&#x2F;etc&#x2F;letsencrypt&#x2F;live&#x2F;gitlab.MY_DOMAIN&#x2F;fullchain.pem&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;20&lt;&#x2F;span&gt;&lt;span&gt;registry_nginx&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;ssl_certificate_key&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt; =&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&#x2F;etc&#x2F;letsencrypt&#x2F;live&#x2F;gitlab.MY_DOMAIN&#x2F;privkey.pem&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;And apply it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; gitlab-ctl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; reconfigure&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Enjoy HTTPS on your GitLab instance :)&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;Sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;webnugget.de&#x2F;setting-up-gitlab-with-free-ssl-certs-from-lets-encrypt-on-ubuntu-14-04&#x2F;&quot;&gt;webnugget.de&#x2F;setting-up-gitlab-with-free-ssl-certs-from-lets-encrypt-on-ubuntu-14-04&#x2F;&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>First time with Docker 🐋</title>
        <published>2015-10-12T10:45:26+00:00</published>
        <updated>2015-10-12T10:45:26+00:00</updated>
        
        <author>
          <name>
            
              Nicolas B.
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nicolas-brousse.fr/articles/2015-10-12-first-time-with-docker/"/>
        <id>https://nicolas-brousse.fr/articles/2015-10-12-first-time-with-docker/</id>
        
        <content type="html" xml:base="https://nicolas-brousse.fr/articles/2015-10-12-first-time-with-docker/">&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.cbf6093f94af7aea.jpg&quot; alt=&quot;&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.cbf6093f94af7aea.jpg&quot;
     width=&quot;1280&quot; height=&quot;774&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.722ac0af3d5b10db.jpg 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.780d31d5538a0d64.jpg 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.ea07a8d6248dd79f.jpg 1280w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;p&gt;Maybe you already hear about &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.docker.com&#x2F;&quot;&gt;Docker&lt;&#x2F;a&gt;, this open source application to manage containers. But it’s not very easy to start working with it.&lt;br &#x2F;&gt;
There is only few weeks that I start to understand how it works. So I decided to write an article to list some basics.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;a class=&quot;post-anchor&quot; href=&quot;#prerequisites&quot; aria-label=&quot;Anchor link for: prerequisites&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;There are multiple ways to install Docker listed in the &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.docker.com&#x2F;installation&#x2F;&quot;&gt;documentation&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I am working on OSX, so I will be focus on the OSX environment. If you are on Linux just follow the Docker &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.docker.com&#x2F;installation&#x2F;&quot;&gt;documentation&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;You can use &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.docker.com&#x2F;toolbox&quot;&gt;Docker Toolbox&lt;&#x2F;a&gt; to install Docker via an installer. But I prefer to do the installation by using command lines as follows.&lt;&#x2F;p&gt;
&lt;p&gt;First we need &lt;strong&gt;VirtualBox&lt;&#x2F;strong&gt; installed.&lt;br &#x2F;&gt;
We could install it from their &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;virtualbox.org&#x2F;wiki&#x2F;Downloads&#x2F;&quot;&gt;website&lt;&#x2F;a&gt; or with &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;caskroom.io&#x2F;&quot;&gt;Homebrew Cask&lt;&#x2F;a&gt; like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; brew&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; cask&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; install&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; virtualbox&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then install Docker.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; brew&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; install&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;blockquote class=&quot;markdown-alert-important&quot;&gt;
&lt;p&gt;If you are using MacPorts there are the &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;www.macports.org&#x2F;ports.php?by=name&amp;amp;substr=docker&quot;&gt;same packets&lt;&#x2F;a&gt;.&lt;br &#x2F;&gt;
&lt;code&gt;sudo port install docker&lt;&#x2F;code&gt; do the same.&lt;&#x2F;p&gt;
&lt;&#x2F;blockquote&gt;
&lt;h3 id=&quot;docker-machine&quot;&gt;Docker Machine&lt;a class=&quot;post-anchor&quot; href=&quot;#docker-machine&quot; aria-label=&quot;Anchor link for: docker-machine&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;On Linux we can use Docker directly after its installation. But on OSX we need to install &lt;code&gt;boot2docker&lt;&#x2F;code&gt; to be able to use Docker. It creates a very small Linux VM.&lt;&#x2F;p&gt;
&lt;p&gt;There is two ways to install it. You can follow installation instructions on &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;boot2docker.io&#x2F;&quot;&gt;boot2docker.io&lt;&#x2F;a&gt; or install it via &lt;code&gt;docker-machine&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;I prefer to use &lt;code&gt;docker-machine&lt;&#x2F;code&gt; because it allows to install and manage multiple machines (locales and remotes).&lt;&#x2F;p&gt;
&lt;p&gt;So let’s install it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; brew&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; install&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker-machine&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Then we need to create the Docker machine named &lt;code&gt;dev&lt;&#x2F;code&gt; (&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;docs.docker.com&#x2F;machine&#x2F;get-started&#x2F;&quot;&gt;Docker Machine get started&lt;&#x2F;a&gt;).&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker-machine&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; create&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;-driver&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; virtualbox&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; dev&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If we list our machines we have the dev docker machine.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker-machine&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ls&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;NAME&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;   ACTIVE&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;   DRIVER&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;       STATE&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;     URL&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;                         SWARM&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;dev&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;             virtualbox&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;   Running&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;   tcp:&#x2F;&#x2F;192.168.99.100:2376&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;But if we try listing the processes we have an error.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ps&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; list the processes&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;Get&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; http:&#x2F;&#x2F;&#x2F;var&#x2F;run&#x2F;docker.sock&#x2F;v1.20&#x2F;containers&#x2F;json:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; dial&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; unix&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &#x2F;var&#x2F;run&#x2F;docker.sock:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; no&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; such&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; file&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; or&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; directory.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;*&lt;&#x2F;span&gt;&lt;span&gt; Are you trying to connect to a TLS-enabled daemon without TLS&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;*&lt;&#x2F;span&gt;&lt;span&gt; Is your docker daemon up and running&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;?&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;&lt;code&gt;docker&lt;&#x2F;code&gt; command needs some informations about the host machine to communicate with it and do the jobs we need.
We have to set the &lt;code&gt;env&lt;&#x2F;code&gt; variables with this command.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; eval&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;docker-machine&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; env&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; dev&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ps&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;CONTAINER&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ID&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;        IMAGE&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;                        COMMAND&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;                CREATED&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;              STATUS&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;              PORTS&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;               NAMES&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We are now ready to create our first Docker container.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;docker-with-existing-images&quot;&gt;Docker with existing images&lt;a class=&quot;post-anchor&quot; href=&quot;#docker-with-existing-images&quot; aria-label=&quot;Anchor link for: docker-with-existing-images&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;As first example we could use a simple and light image named &lt;code&gt;busybox&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;busybox&quot;&gt;Busybox&lt;a class=&quot;post-anchor&quot; href=&quot;#busybox&quot; aria-label=&quot;Anchor link for: busybox&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;hub.docker.com&#x2F;_&#x2F;busybox&#x2F;&quot;&gt;Busybox&lt;&#x2F;a&gt; is one of the smallest Docker images (less than 5MB). This image contains “common UNIX utilities into a single small executable”.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;it&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; busybox&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;By doing this command we will create a new container from the &lt;code&gt;busybox&lt;&#x2F;code&gt; image. If this is the first time we execute it, it will pull the image first.&lt;br &#x2F;&gt;
And for this image it will open a shell inside. This come from its &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;docker-library&#x2F;busybox&#x2F;blob&#x2F;4979e9bb245d8e28d37f9cf21c01b828d3830da5&#x2F;upstream&#x2F;Dockerfile#L3&quot;&gt;definition&lt;&#x2F;a&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;When we are into the container we could do what we want. It’s really close to a VM for this part.&lt;br &#x2F;&gt;
But each time we use &lt;code&gt;docker run&lt;&#x2F;code&gt; command, it will create a new container and loose what we did. If we want to use the same container we have to name it with &lt;code&gt;--name&lt;&#x2F;code&gt; option and &lt;code&gt;--detatch&lt;&#x2F;code&gt; the container.&lt;&#x2F;p&gt;
&lt;p&gt;For example:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;itd&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;-name=my-busybox&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; busybox&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;3c4eb1117ece13b72647459960f4438f9da1b9445afe56188b19d1492b8c1c61&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; And play with &amp;#39;my-busybox&amp;#39; container&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; exec&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;it&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; my-busybox&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;la&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; exec&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;it&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; my-busybox&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; touch&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; index.html&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; exec&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;it&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; my-busybox&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ls&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;la&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; exec&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;it&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; my-busybox&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; echo&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; hello&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; world&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; exec&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;it&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; my-busybox&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; sh&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;About the &lt;code&gt;docker run&lt;&#x2F;code&gt; options:&lt;br &#x2F;&gt;
&lt;code&gt;-d, --detach=false&lt;&#x2F;code&gt;: Run container in background and print container ID&lt;br &#x2F;&gt;
&lt;code&gt;--name=&lt;&#x2F;code&gt;: Assign a name to the container&lt;br &#x2F;&gt;
&lt;code&gt;-i, --interactive=false&lt;&#x2F;code&gt;: Keep STDIN open even if not attached.&lt;br &#x2F;&gt;
&lt;code&gt;-t, --tty=false&lt;&#x2F;code&gt;: Allocate a pseudo-TTY.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;debian&quot;&gt;Debian&lt;a class=&quot;post-anchor&quot; href=&quot;#debian&quot; aria-label=&quot;Anchor link for: debian&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;To test something most common. We could do the same with the &lt;code&gt;debian&lt;&#x2F;code&gt; image.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;it&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; debian&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;For &lt;code&gt;debian&lt;&#x2F;code&gt; image it’s similar than the &lt;code&gt;busybox&lt;&#x2F;code&gt; one. But it will open a instance with &lt;code&gt;bash&lt;&#x2F;code&gt; and not &lt;code&gt;sh&lt;&#x2F;code&gt; (&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;tianon&#x2F;docker-brew-debian&#x2F;blob&#x2F;fbf1d76bdcba758d49f5fbf5c591e5149658e991&#x2F;jessie&#x2F;Dockerfile#L3&quot;&gt;debian image definition&lt;&#x2F;a&gt;).&lt;&#x2F;p&gt;
&lt;h3 id=&quot;nginx&quot;&gt;Nginx&lt;a class=&quot;post-anchor&quot; href=&quot;#nginx&quot; aria-label=&quot;Anchor link for: nginx&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;Now let’s use &lt;code&gt;nginx&lt;&#x2F;code&gt; image. This works a bit different.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;p&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; 8000:80&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; nginx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;With this command we expose the port &lt;code&gt;80&lt;&#x2F;code&gt; of the container into the port &lt;code&gt;8000&lt;&#x2F;code&gt; of docker host.&lt;br &#x2F;&gt;
Just execute one of this two lines in a new terminal to check it.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; curl&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; $(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;docker-machine&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; dev&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;:8000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; To open in browser (OSX)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; open&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; http:&#x2F;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;$(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;docker-machine&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ip&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; dev&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;:8000&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Nice but could be better by including content!&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; run&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;p&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; 8000:80&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EA76CB, #F5C2E7);&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;  -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;v&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &#x2F;path&#x2F;to&#x2F;content:&#x2F;usr&#x2F;share&#x2F;nginx&#x2F;html:ro&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#EA76CB, #F5C2E7);&quot;&gt; \&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;  nginx&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;If we refresh our brother we now have our folder accessible :)&lt;&#x2F;p&gt;
&lt;p&gt;About the options:&lt;br &#x2F;&gt;
&lt;code&gt;-p, --publish=[]&lt;&#x2F;code&gt;: Publish a container’s port(s) to the host.&lt;br &#x2F;&gt;
&lt;code&gt;-v, --volume=[]&lt;&#x2F;code&gt;: Bind mount a volume.&lt;&#x2F;p&gt;
&lt;p&gt;Explanation of &lt;code&gt;&#x2F;path&#x2F;to&#x2F;content:&#x2F;usr&#x2F;share&#x2F;nginx&#x2F;html:ro&lt;&#x2F;code&gt;:&lt;br &#x2F;&gt;
&lt;code&gt;&#x2F;path&#x2F;to&#x2F;content&lt;&#x2F;code&gt;: is the local folder to share.&lt;br &#x2F;&gt;
&lt;code&gt;&#x2F;usr&#x2F;share&#x2F;nginx&#x2F;html&lt;&#x2F;code&gt;: the remote folder.&lt;br &#x2F;&gt;
&lt;code&gt;ro&lt;&#x2F;code&gt;: read-only mode (optional).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;remove-old-containers&quot;&gt;Remove old containers&lt;a class=&quot;post-anchor&quot; href=&quot;#remove-old-containers&quot; aria-label=&quot;Anchor link for: remove-old-containers&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Some commands to help us.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ps&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;CONTAINER&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ID&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;        IMAGE&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;                        COMMAND&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;                CREATED&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;              STATUS&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;              PORTS&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;               NAMES&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;We normally have nothing running. But it does not mean that there is 0 containers.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ps&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;a&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;CONTAINER&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ID&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;        IMAGE&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;               COMMAND&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;                  CREATED&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;             STATUS&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;                      PORTS&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;               NAMES&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;60477ca46da0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;        debian&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;              &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&#x2F;bin&#x2F;bash&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;              4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; minutes&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ago&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;       Exited&lt;&#x2F;span&gt;&lt;span&gt; (0&lt;&#x2F;span&gt;&lt;span&gt;) 4 seconds ago                        boring_morse&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;4e584955af81&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;        nginx&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;               &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;nginx -g &amp;#39;daemon off&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;   5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; minutes&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ago&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;       Exited&lt;&#x2F;span&gt;&lt;span&gt; (0&lt;&#x2F;span&gt;&lt;span&gt;) 35 seconds ago                       agitated_mahavira&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;There is container exited. The following command will remove containers that not running.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;shellscript&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;$&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; rm&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; $(&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;docker&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; ps&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;a&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; -&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;q&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;)&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;dockerfile-docker-composer&quot;&gt;Dockerfile, Docker-composer&lt;a class=&quot;post-anchor&quot; href=&quot;#dockerfile-docker-composer&quot; aria-label=&quot;Anchor link for: dockerfile-docker-composer&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;I will talk about &lt;code&gt;Dockerfile&lt;&#x2F;code&gt; file and &lt;code&gt;docker-compose&lt;&#x2F;code&gt; command in a next article.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;a class=&quot;post-anchor&quot; href=&quot;#conclusion&quot; aria-label=&quot;Anchor link for: conclusion&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Really interesting tool but it need a new an approach.&lt;br &#x2F;&gt;
For a web application we don’t really have to use and configure a http server. It’s not the job of the application container. But we may have to use a proxy that could be instantiate into a container. And its the proxy server that will redirect the call into the good docker container port.&lt;&#x2F;p&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Test #1 — Use Sidekiq on a separate servers</title>
        <published>2015-07-15T00:00:00+00:00</published>
        <updated>2015-07-15T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Nicolas B.
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nicolas-brousse.fr/articles/2015-07-15-test-1-sidekiq-on-separate-servers/"/>
        <id>https://nicolas-brousse.fr/articles/2015-07-15-test-1-sidekiq-on-separate-servers/</id>
        
        <content type="html" xml:base="https://nicolas-brousse.fr/articles/2015-07-15-test-1-sidekiq-on-separate-servers/">&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.361201b45685ca07.jpg&quot; alt=&quot;&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.361201b45685ca07.jpg&quot;
     width=&quot;1280&quot; height=&quot;512&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.97e7b0ea090816f9.jpg 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.f7e1b98d978384fc.jpg 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.36c72b2d3bddf572.jpg 1280w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.66d3022e3055f746.jpg 1920w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;p&gt;These last days I tried to use Sidekiq on different servers than the Rails app one.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;first-what-is-sidekiq&quot;&gt;First, What is Sidekiq?&lt;a class=&quot;post-anchor&quot; href=&quot;#first-what-is-sidekiq&quot; aria-label=&quot;Anchor link for: first-what-is-sidekiq&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;sidekiq.org&#x2F;&quot;&gt;Sidekiq&lt;&#x2F;a&gt; is a &lt;q&gt;Simple, efficient background processing for Ruby&lt;&#x2F;q&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;With more words, it’s a library who allows you to create job classes. A job contains the code pieces you want to perform later. It’s a kind of code decentralization.&lt;&#x2F;p&gt;
&lt;p&gt;And in this test the goal is to try running the job in different server than the web server.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;why&quot;&gt;Why?&lt;a class=&quot;post-anchor&quot; href=&quot;#why&quot; aria-label=&quot;Anchor link for: why&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Why is it better to separate worker of web server?&lt;br &#x2F;&gt;
Imagine you need to do processes, so you use memory and CPU. In this case that means you take web server resources. So your web app could be slower.&lt;&#x2F;p&gt;
&lt;p&gt;By using different servers, it uses separate server resources. If process needs time, it takes the time it needs. And you could eventually decide to use a bigger server later.&lt;br &#x2F;&gt;
So it’s just easier to scale web and worker servers separately with you VPS or cloud hosting provider.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;test-in-pictures&quot;&gt;Test in pictures&lt;a class=&quot;post-anchor&quot; href=&quot;#test-in-pictures&quot; aria-label=&quot;Anchor link for: test-in-pictures&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;To do this test I used &lt;strong&gt;Vagrant&lt;&#x2F;strong&gt; with 3 VMs. One for the Rails &lt;code&gt;web&lt;&#x2F;code&gt; server and two others for Sidekiq named &lt;code&gt;worker-01&lt;&#x2F;code&gt; + &lt;code&gt;worker-02&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;For the Rails app code I simply used the one of the &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;railscasts.com&#x2F;episodes&#x2F;366-sidekiq&#x2F;&quot;&gt;Railscast #366&lt;&#x2F;a&gt; by &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;twitter.com&#x2F;rbates&quot;&gt;Ryan Bates&lt;&#x2F;a&gt;.&lt;br &#x2F;&gt;
I only converted the Sidekiq worker into a Rails ActiveJob.&lt;&#x2F;p&gt;
&lt;p&gt;The example is a simple snippets application.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;1-set-data-into-form&quot;&gt;1. Set data into form&lt;a class=&quot;post-anchor&quot; href=&quot;#1-set-data-into-form&quot; aria-label=&quot;Anchor link for: 1-set-data-into-form&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-1.5caa85a74a167c37.png&quot; alt=&quot;Form&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-1.5caa85a74a167c37.png&quot;
     width=&quot;1280&quot; height=&quot;769&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-1.d4f8f22f617575a0.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-1.158211d3b5011337.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-1.d01f5346399f5f5f.png 1280w&quot;
     loading=&quot;lazy&quot;&gt;

This is the “homepage” and also the form to send the code of our snippet.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;2-after-data-posted&quot;&gt;2. After data posted&lt;a class=&quot;post-anchor&quot; href=&quot;#2-after-data-posted&quot; aria-label=&quot;Anchor link for: 2-after-data-posted&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-2.b8058e4222d8dfc0.png&quot; alt=&quot;Datas posted&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-2.b8058e4222d8dfc0.png&quot;
     width=&quot;1280&quot; height=&quot;769&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-2.f040a6b1f5330880.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-2.7112e5b930798a61.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-2.ba6af315ed7ab9f1.png 1280w&quot;
     loading=&quot;lazy&quot;&gt;

After posted our snippet we could see the code. Currently the code is still raw. We have to wait the job is processed.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;3-after-worker-processed&quot;&gt;3. After worker processed&lt;a class=&quot;post-anchor&quot; href=&quot;#3-after-worker-processed&quot; aria-label=&quot;Anchor link for: 3-after-worker-processed&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-3.f54a079b6fec2af4.png&quot; alt=&quot;Datas processed&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-3.f54a079b6fec2af4.png&quot;
     width=&quot;1280&quot; height=&quot;769&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-3.3862dc1d604ccc56.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-3.03e13d6274eae6fe.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-3.c18ac9026c45f6f4.png 1280w&quot;
     loading=&quot;lazy&quot;&gt;

Now the worker processed the job. The code is full of colors.
And we could see that the IP is a different one and the hostname as well.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;4-retry-a-new-once&quot;&gt;4. Retry a new once&lt;a class=&quot;post-anchor&quot; href=&quot;#4-retry-a-new-once&quot; aria-label=&quot;Anchor link for: 4-retry-a-new-once&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-4.3a61260042689898.png&quot; alt=&quot;Datas posted after retry&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-4.3a61260042689898.png&quot;
     width=&quot;1280&quot; height=&quot;769&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-4.aee7a18c4fb16c1d.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-4.589dabdcfa2e769f.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-4.5e432d0ac2eb2c80.png 1280w&quot;
     loading=&quot;lazy&quot;&gt;

In my example I instantiate two worker servers. So I do others tests.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;5-after-worker-processed-on-a-different-worker&quot;&gt;5. After worker processed on a different worker&lt;a class=&quot;post-anchor&quot; href=&quot;#5-after-worker-processed-on-a-different-worker&quot; aria-label=&quot;Anchor link for: 5-after-worker-processed-on-a-different-worker&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-5.c4445e56f8f62b24.png&quot; alt=&quot;Datas processed after retry&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-5.c4445e56f8f62b24.png&quot;
     width=&quot;1280&quot; height=&quot;769&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-5.8cf6ec6647795d01.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-5.084cb7c5f5f974c4.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-5.8aee9c879fbccff4.png 1280w&quot;
     loading=&quot;lazy&quot;&gt;

In this new test the IP is not the same than the other time. It’s not the same worker server who processed the job.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;sidekiq-admin&quot;&gt;Sidekiq admin&lt;a class=&quot;post-anchor&quot; href=&quot;#sidekiq-admin&quot; aria-label=&quot;Anchor link for: sidekiq-admin&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-6.293292b93cf5dceb.png&quot; alt=&quot;Sidekiq admin&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-6.293292b93cf5dceb.png&quot;
     width=&quot;1280&quot; height=&quot;770&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-6.c8505d5a98fff9ad.png 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-6.a467c4167ea4ea00.png 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;img-6.4571224d643b8eb9.png 1280w&quot;
     loading=&quot;lazy&quot;&gt;

We have the list of the Sidekiq processes who are working. The two (or more) workers are listed here :)&lt;&#x2F;p&gt;
&lt;h2 id=&quot;serveurs-configuration&quot;&gt;Serveurs configuration&lt;a class=&quot;post-anchor&quot; href=&quot;#serveurs-configuration&quot; aria-label=&quot;Anchor link for: serveurs-configuration&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Let see with scheme how it looks for the servers configuration.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;my-current-test-with-vagrant&quot;&gt;My current test with Vagrant&lt;a class=&quot;post-anchor&quot; href=&quot;#my-current-test-with-vagrant&quot; aria-label=&quot;Anchor link for: my-current-test-with-vagrant&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;For the test I did with Vagrant, it looked like this.&lt;&#x2F;p&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;configuration-vagrant.a9d5e3078aa8ccd5.png&quot; alt=&quot;Vagrant configuration&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;configuration-vagrant.a9d5e3078aa8ccd5.png&quot;
     width=&quot;661&quot; height=&quot;469&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;configuration-vagrant.e6d0cd7b8cc2dd05.png 640w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;p&gt;So we have the &lt;code&gt;web&lt;&#x2F;code&gt; server who also contains the Redis server and the Rails app. Because this is a test, I run the application in development mode with Rack.
The application is exactly the same used for the 3 servers. So I used an Sqlite as a file for simplicity.&lt;&#x2F;p&gt;
&lt;p&gt;For the &lt;code&gt;worker&lt;&#x2F;code&gt;s it uses the same Redis server and database. And I run the Sidekiq root process as a daemon.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;production-example&quot;&gt;Production example&lt;a class=&quot;post-anchor&quot; href=&quot;#production-example&quot; aria-label=&quot;Anchor link for: production-example&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;So, what about a production configuration? It could be something like this.&lt;&#x2F;p&gt;
&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;configuration-production-example.40a7cfc01ee30012.png&quot; alt=&quot;Example of production configuration&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;configuration-production-example.40a7cfc01ee30012.png&quot;
     width=&quot;495&quot; height=&quot;908&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;&quot;
     loading=&quot;lazy&quot;&gt;
&lt;p&gt;And have separate &lt;code&gt;db&lt;&#x2F;code&gt; and &lt;code&gt;redis&lt;&#x2F;code&gt; servers. &lt;code&gt;web&lt;&#x2F;code&gt; servers only contain the application with the http server. If you want multiple &lt;code&gt;web&lt;&#x2F;code&gt; servers, you have to install a proxy server as HAProxy.&lt;&#x2F;p&gt;
&lt;h2 id=&quot;code-sources&quot;&gt;Code sources&lt;a class=&quot;post-anchor&quot; href=&quot;#code-sources&quot; aria-label=&quot;Anchor link for: code-sources&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;If you want to test it, &lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nicolas-brousse&#x2F;1-sidekiq-separate-servers&quot;&gt;all the code is available on GitHub&lt;&#x2F;a&gt;.&lt;br &#x2F;&gt;
After clone or download you only have to install Vagrant (if you haven’t yet) and just &lt;code&gt;vagrant up&lt;&#x2F;code&gt;.&lt;&#x2F;p&gt;
&lt;p&gt;Have fun 😄!&lt;&#x2F;p&gt;
&lt;hr &#x2F;&gt;
&lt;p&gt;Sources:&lt;&#x2F;p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;18265427&#x2F;is-it-possible-to-run-sidekiq-on-a-separate-host-from-the-rails-host&quot;&gt;Stackoverflow question about Sidekiq on separate server&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;docs.vagrantup.com&#x2F;v2&#x2F;multi-machine&#x2F;&quot;&gt;Vagrant multi-machine documentation&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;sidekiq.org&#x2F;&quot;&gt;Sidekiq website&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;http:&#x2F;&#x2F;railscasts.com&#x2F;episodes&#x2F;366-sidekiq&#x2F;&quot;&gt;‘Railscast #366 Sidekiq’&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;li&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;github.com&#x2F;nicolas-brousse&#x2F;1-sidekiq-separate-servers&quot;&gt;Source code&lt;&#x2F;a&gt;&lt;&#x2F;li&gt;
&lt;&#x2F;ul&gt;
</content>
        
    </entry>
    <entry xml:lang="en">
        <title>Rack web profiler</title>
        <published>2015-06-22T00:00:00+00:00</published>
        <updated>2015-06-22T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Nicolas B.
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nicolas-brousse.fr/articles/2015-06-22-rack-web-profiler/"/>
        <id>https://nicolas-brousse.fr/articles/2015-06-22-rack-web-profiler/</id>
        
        <content type="html" xml:base="https://nicolas-brousse.fr/articles/2015-06-22-rack-web-profiler/">&lt;img src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.3e3d09ed84d251a0.jpg&quot; alt=&quot;&quot;
     data-zoomable=&quot;true&quot; data-zoom-src=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.3e3d09ed84d251a0.jpg&quot;
     width=&quot;1280&quot; height=&quot;512&quot;
     sizes=&quot;(min-width: 920px) 784px, (min-width: 700px) calc(82vw + 46px), calc(100vw - 40px)&quot; 
     srcset=&quot;https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.abcabb6c5edaf13b.jpg 640w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.deca489ff68d13d1.jpg 784w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.5243bad4f85cd63a.jpg 1280w,
             https:&#x2F;&#x2F;nicolas-brousse.fr&#x2F;processed_images&#x2F;banner.4ea80151b3d345c1.jpg 1920w&quot;
     loading=&quot;lazy&quot;&gt;
&lt;p&gt;Before I started using Ruby, I coded mostly with PHP. Back then, I worked a lot with Symfony2 and its web profiler.&lt;br &#x2F;&gt;
I found it really nice and I’m surprised that nothing similar exists in Ruby and Ruby on Rails.
So I decided to create one.&lt;&#x2F;p&gt;
&lt;p&gt;I’m currently working on it. I mainly would like to provide a nice an simple DSL to allow everybody
to create and register their own collector(s).&lt;&#x2F;p&gt;
&lt;h2 id=&quot;create-a-collector&quot;&gt;Create a collector&lt;a class=&quot;post-anchor&quot; href=&quot;#create-a-collector&quot; aria-label=&quot;Anchor link for: create-a-collector&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;Until now I’m thinking about creating &lt;abbr title=&quot;Domain-Specific Language&quot; class=&quot;initialism&quot;&gt;DSL&lt;&#x2F;abbr&gt;&lt;sup class=&quot;footnote-reference&quot; id=&quot;fr-1-1&quot;&gt;&lt;a href=&quot;#fn-1&quot;&gt;1&lt;&#x2F;a&gt;&lt;&#x2F;sup&gt; like the examples right after.
As a lot of libraries and tools, it’s a nice way to allow externals extended.&lt;&#x2F;p&gt;
&lt;p&gt;To start prototyping I worked with classic classes. But I guess it’s a nice instant to move in a DSL way.
So, here are the two ways I think are interesting.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;dsl-with-template-file&quot;&gt;DSL with template file&lt;a class=&quot;post-anchor&quot; href=&quot;#dsl-with-template-file&quot; aria-label=&quot;Anchor link for: dsl-with-template-file&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;class&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; MyCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span&gt;  extends &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;Collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;DSL&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span&gt;  collector_name &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;my_collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Technical name of the collector.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span&gt;  icon     &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;                   #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Base64 encoded image for the icon collector.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;  position &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;0&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;                    #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Position of the collector in the toolbar.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Retrieve the env, the request and the response&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; to collect the needed information. Then save datas&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; and show them in the profiler toolbar and panel.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span&gt;  collect &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;env&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; request&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span&gt; response&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span&gt;    store &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;version&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; MyApp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;VERSION&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;13&lt;&#x2F;span&gt;&lt;span&gt;    store &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;list&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; [&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;value1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;value2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;15&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;16&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; The path of the collector template.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;17&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; May be with some options to know if we show the collector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;18&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; on tab and&#x2F;or panel.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;19&lt;&#x2F;span&gt;&lt;span&gt;  template &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;..&#x2F;path&#x2F;to&#x2F;template.erb&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt; tab&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; false&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt; panel&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; false&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;20&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;21&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; To know if the collector must be enabled.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;22&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  #&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Usefull to load collector only if a gem is installed.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;23&lt;&#x2F;span&gt;&lt;span&gt;  is_enabled? &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;defined?&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; MyApp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;24&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;The &lt;code&gt;erb&lt;&#x2F;code&gt; template could look like this. By using the &lt;code&gt;content_for&lt;&#x2F;code&gt; method.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;erb&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span&gt; content_for &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;tab&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; do&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  &amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Here the tab content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;  &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;div&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);&quot;&gt; class&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;tab&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;    &amp;lt;%=&lt;&#x2F;span&gt;&lt;span&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;version&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;div&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);&quot;&gt; class&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;pane&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;      &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;ul&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;      &amp;lt;%&lt;&#x2F;span&gt;&lt;span&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;list&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;each&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; do&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;item&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;        &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;li&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%=&lt;&#x2F;span&gt;&lt;span&gt; item &lt;&#x2F;span&gt;&lt;span&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;li&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;      &amp;lt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;      &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;ul&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;13&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;    &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;div&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;  &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;div&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;15&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;16&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;17&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span&gt; content_for &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;panel&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; do&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;18&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;  &amp;lt;!--&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; Here the tab &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;--&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;19&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;20&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;  &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;div&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);&quot;&gt; class&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;=&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;panel&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;21&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;    &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;ul&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;22&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;    &amp;lt;%&lt;&#x2F;span&gt;&lt;span&gt; data&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;[&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#D20F39, #F38BA8);&quot;&gt;list&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;]&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;each&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; do&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;item&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;|&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;23&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;      &amp;lt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;li&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%=&lt;&#x2F;span&gt;&lt;span&gt; item &lt;&#x2F;span&gt;&lt;span&gt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;li&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;24&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;    &amp;lt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;25&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;    &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;ul&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;26&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;  &amp;lt;&#x2F;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);&quot;&gt;div&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#179299, #94E2D5);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;27&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;lt;%&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; end&lt;&#x2F;span&gt;&lt;span&gt; %&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;&amp;gt;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;100-dsl&quot;&gt;100% DSL&lt;a class=&quot;post-anchor&quot; href=&quot;#100-dsl&quot; aria-label=&quot;Anchor link for: 100-dsl&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;I’m not sure yet about the template part. It might be better to
have DSL methods into the collector instead of a template.&lt;br &#x2F;&gt;
With something like this:&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;class&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; MyCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 2&lt;&#x2F;span&gt;&lt;span&gt;  extends &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;Collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;DSL&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 3&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 4&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;  .&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 5&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 6&lt;&#x2F;span&gt;&lt;span&gt;  tab_value &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;    &amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;MyApp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 8&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt; 9&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;10&lt;&#x2F;span&gt;&lt;span&gt;  tab_content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;11&lt;&#x2F;span&gt;&lt;span&gt;    table &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;12&lt;&#x2F;span&gt;&lt;span&gt;      row &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;Version&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt; MyApp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;VERSION&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;13&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;14&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;15&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;16&lt;&#x2F;span&gt;&lt;span&gt;  panel_content &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;17&lt;&#x2F;span&gt;&lt;span&gt;    div &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;do&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;18&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;      p&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt; &amp;quot;&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;This is my app with version &lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;#{&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;MyApp&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;::&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt;VERSION&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;}&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#40A02B, #A6E3A1);&quot;&gt;&amp;quot;&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;19&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;    end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;20&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;  end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;21&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;register-a-collector&quot;&gt;Register a collector&lt;a class=&quot;post-anchor&quot; href=&quot;#register-a-collector&quot; aria-label=&quot;Anchor link for: register-a-collector&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;It’s nice to create a collector but we also have to register it. It’s why I prepared some code to allow it.&lt;&#x2F;p&gt;
&lt;h3 id=&quot;into-an-app&quot;&gt;Into an app&lt;a class=&quot;post-anchor&quot; href=&quot;#into-an-app&quot; aria-label=&quot;Anchor link for: into-an-app&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;Then with the collector the idea is just to register it as this.&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot; data-name=&quot;config&#x2F;initializers&#x2F;web_profiler.rb&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;register_collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; MyCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;2&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt;#&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);font-style: italic;&quot;&gt; or&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;4&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;5&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;config&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; do&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt; |&lt;&#x2F;span&gt;&lt;span&gt;c&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;|&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;6&lt;&#x2F;span&gt;&lt;span&gt;  c&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;add_collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; MyCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;7&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h3 id=&quot;into-a-gem&quot;&gt;Into a gem&lt;a class=&quot;post-anchor&quot; href=&quot;#into-a-gem&quot; aria-label=&quot;Anchor link for: into-a-gem&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h3&gt;
&lt;p&gt;But also it allow gems to contain their own collector(s).&lt;&#x2F;p&gt;
&lt;pre class=&quot;giallo&quot; style=&quot;color-scheme: light dark; color: light-dark(#4C4F69, #CDD6F4); background-color: light-dark(#EFF1F5, #1E1E2E);&quot;&gt;&lt;code data-lang=&quot;ruby&quot; data-name=&quot;lib&#x2F;my_gem.rb&quot;&gt;&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;1&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;if&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt; defined?&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; WebProfiler&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;2&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#DF8E1D, #F9E2AF);font-style: italic;&quot;&gt;  WebProfiler&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#7C7F93, #9399B2);&quot;&gt;.&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#1E66F5, #89B4FA);font-style: italic;&quot;&gt;register_collector&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#FE640B, #FAB387);&quot;&gt; MyCollector&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;
&lt;span class=&quot;giallo-l&quot;&gt;&lt;span aria-hidden=&quot;true&quot; class=&quot;giallo-ln&quot; style=&quot;color: light-dark(#8C8FA1, #7F849C);&quot;&gt;3&lt;&#x2F;span&gt;&lt;span style=&quot;color: light-dark(#8839EF, #CBA6F7);&quot;&gt;end&lt;&#x2F;span&gt;&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;a class=&quot;post-anchor&quot; href=&quot;#conclusion&quot; aria-label=&quot;Anchor link for: conclusion&quot;&gt;&lt;span aria-hidden=&quot;true&quot;&gt;#&lt;&#x2F;span&gt;&lt;&#x2F;a&gt;
&lt;&#x2F;h2&gt;
&lt;p&gt;In my opinion the template file is nicer to management html. At least if the html to generate is big.&lt;br &#x2F;&gt;
But have the content into the collector class is simpler because we only have one file.&lt;&#x2F;p&gt;
&lt;p&gt;I will inform you of the progression.&lt;&#x2F;p&gt;
&lt;section class=&quot;footnotes&quot;&gt;
&lt;ol class=&quot;footnotes-list&quot;&gt;
&lt;li id=&quot;fn-1&quot;&gt;
&lt;p&gt;&lt;a rel=&quot;noopener noreferrer external&quot; target=&quot;_blank&quot; href=&quot;https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Domain-specific_language&quot;&gt;DSL wikipedia page&lt;&#x2F;a&gt; &lt;a href=&quot;#fr-1-1&quot;&gt;↩&lt;&#x2F;a&gt;&lt;&#x2F;p&gt;
&lt;&#x2F;li&gt;
&lt;&#x2F;ol&gt;
&lt;&#x2F;section&gt;
</content>
        
    </entry>
</feed>
