<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marcel Cozma</title>
    <description>The latest articles on DEV Community by Marcel Cozma (@mr_zet).</description>
    <link>https://dev.to/mr_zet</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F613993%2Fc7cdac6c-a682-492f-b6a4-7d0c03460114.jpg</url>
      <title>DEV Community: Marcel Cozma</title>
      <link>https://dev.to/mr_zet</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mr_zet"/>
    <language>en</language>
    <item>
      <title>Lando usefull comands</title>
      <dc:creator>Marcel Cozma</dc:creator>
      <pubDate>Sun, 06 Feb 2022 23:58:32 +0000</pubDate>
      <link>https://dev.to/mr_zet/lando-usefull-comands-4h2p</link>
      <guid>https://dev.to/mr_zet/lando-usefull-comands-4h2p</guid>
      <description>&lt;h1&gt;
  
  
  Drop into a shell on the database service
&lt;/h1&gt;

&lt;p&gt;&lt;code&gt;lando ssh -s database&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Using environment variables
&lt;/h2&gt;

&lt;p&gt;You can also set environment variables that will ONLY be available for a given tooling command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tooling:
  deploy:
    service: appserver
    cmd: deploy.sh
    env:
      TARGET: production
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Build Steps
&lt;/h2&gt;

&lt;p&gt;One of the great features of Lando is its ability to destroy a single planet... we mean add additional dependencies or build steps to your service without the hassle of having to build or manage your own Dockerfiles.&lt;/p&gt;

&lt;p&gt;Note that build steps will ONLY RUN THE FIRST TIME YOU SPIN UP YOUR APP. That means if you change them, you will need to run lando rebuild for them to re-run. An exception to this is if one or more of your build steps error. When this happens Lando will run the build steps until they complete successfully.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When should I use build steps?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you need additional on-server dependencies like php extensions or node modules, it sounds like a build step may be for you. If you have automation, you want to run EVERY TIME and you may want to consider using events instead.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There are four major build steps.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;build&lt;/code&gt; runs as "you" and before your service boots up&lt;br&gt;
&lt;code&gt;build_as_root&lt;/code&gt; runs as root and before your service boots up&lt;br&gt;
&lt;code&gt;run&lt;/code&gt; runs as "you" and after your service boots up&lt;br&gt;
&lt;code&gt;run_as_root&lt;/code&gt; runs as root and after your service boots up&lt;br&gt;
An example to consider is shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;services:
  appserver:
    type: php:7.1
    build_as_root:
      - apt-get update -y &amp;amp;&amp;amp; apt-get install -y libmemcached-dev
      - pecl install memcached
      - docker-php-ext-enable memcached
    run:
      - composer install
  node:
    type: node:16
    build:
      - yarn
    run:
      - /helpers/some-helper-script.sh
    run_as_root:
      - echo "127.0.0.1 mysite.lndo.site" &amp;gt;&amp;gt; /etc/hosts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can likely surmise from the above, each step is intended for a pretty specific use case:&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;build&lt;/code&gt; to install application dependencies that are needed before you start your application&lt;br&gt;
Use &lt;code&gt;build_as_root&lt;/code&gt; to install low level server packages required by your application&lt;br&gt;
Use &lt;code&gt;run&lt;/code&gt; to install application dependencies or run build steps that require your application be started first&lt;br&gt;
Use &lt;code&gt;run_as_root&lt;/code&gt; for any other post-start root level one-time setup commands.&lt;/p&gt;

</description>
      <category>lando</category>
      <category>webdev</category>
      <category>devops</category>
      <category>docker</category>
    </item>
    <item>
      <title>Articles occupy all browser with CSS only</title>
      <dc:creator>Marcel Cozma</dc:creator>
      <pubDate>Sat, 16 Oct 2021 18:37:22 +0000</pubDate>
      <link>https://dev.to/mr_zet/articles-occupy-all-browser-with-css-only-3idk</link>
      <guid>https://dev.to/mr_zet/articles-occupy-all-browser-with-css-only-3idk</guid>
      <description>&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/marcel-cozma/embed/LYjGBvg?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>codepen</category>
    </item>
    <item>
      <title>Add "decorated" child divs with jQuery</title>
      <dc:creator>Marcel Cozma</dc:creator>
      <pubDate>Sat, 16 Oct 2021 18:31:38 +0000</pubDate>
      <link>https://dev.to/mr_zet/add-decorated-child-divs-29ij</link>
      <guid>https://dev.to/mr_zet/add-decorated-child-divs-29ij</guid>
      <description>&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/marcel-cozma/embed/YzxwjjR?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>codepen</category>
      <category>divacreative</category>
    </item>
    <item>
      <title>your first post now</title>
      <dc:creator>Marcel Cozma</dc:creator>
      <pubDate>Tue, 13 Apr 2021 23:45:31 +0000</pubDate>
      <link>https://dev.to/mr_zet/your-first-post-now-294o</link>
      <guid>https://dev.to/mr_zet/your-first-post-now-294o</guid>
      <description>&lt;p&gt;Asked to write "your first post now". |x| Done!&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
