<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator><link href="https://www.hirschler.solutions/feed.xml" rel="self" type="application/atom+xml" /><link href="https://www.hirschler.solutions/" rel="alternate" type="text/html" /><updated>2025-11-28T08:54:17+00:00</updated><id>https://www.hirschler.solutions/feed.xml</id><title type="html">Hirschler IT Solutions</title><subtitle>Softwareentwicklung und Beratung</subtitle><author><name>Michael Hirschler</name><email>michael@hirschler.solutions</email></author><entry><title type="html">PowerWalker UPS on Fedora Server 36</title><link href="https://www.hirschler.solutions/posts/2022/06/powerwalker-ups-on-fedora-server-36" rel="alternate" type="text/html" title="PowerWalker UPS on Fedora Server 36" /><published>2022-06-13T00:00:00+00:00</published><updated>2022-06-13T00:00:00+00:00</updated><id>https://www.hirschler.solutions/posts/2022/06/powerwalker-ups-on-fedora-36</id><content type="html" xml:base="https://www.hirschler.solutions/posts/2022/06/powerwalker-ups-on-fedora-server-36"><![CDATA[<p>I recently bought a UPS for my small server setup. Setting it up to automatically shutdown my system in case of a power outage wasn’t that hard. Here is how.</p>

<p>I’m using a <strong>PowerWalker Basic VI 850 SB</strong> (international), which can be connected via USB. Hint: vendor does not provide USB-cable (Type B needed).</p>

<p>I’m going to use <a href="https://networkupstools.org">the <strong>Network UPS Tools</strong></a> (NUT) to monitor the status of my UPS and - if needed - keep my server alive.</p>

<h2 id="why-do-i-want-to-use-a-ups">Why do I want to use a UPS?</h2>
<p>Main motivation on this is to prevent <em>data loss</em>. Additionally a UPS <a href="https://en.wikipedia.org/wiki/Uninterruptible_power_supply#Common_power_problems">corrects common power issues</a>, whereas mine is line-interactive. In simple terms: it prevents under-/overvoltage to some degree.</p>

<p>Connected to my server, it signals when a power outage occurs, tries to keep it up until it’s battery is low and shutting it down to prevent damaged RAID-/disks.</p>

<h2 id="introduction-to-nut">Introduction to NUT</h2>
<p>NUT provides tools for connecting, monitoring and communicate stats about a UPS.
In short: it can be used on a <a href="https://en.wikipedia.org/wiki/Small_office/home_office">SOHO</a> setup, as well as on a multi-server farm in any 19” server rack (one UPS, many appliances connected to it). Take a look the <a href="https://networkupstools.org/features.html#_monitoring_diagrams">monitoring diagrams</a>.</p>

<p>NUT utilizes:</p>
<ul>
  <li>a driver capable to communicate with one or many UPS’s</li>
  <li><code class="language-plaintext highlighter-rouge">upsd</code> the server, which reads data from driver and allows network communication</li>
  <li><code class="language-plaintext highlighter-rouge">upsmon</code> monitoring to set some actions based on UPS’ state</li>
</ul>

<p>A <a href="https://networkupstools.org/stable-hcl.html">list of compatible power supplies</a> can be found on the website.</p>

<h2 id="installation-and-configuration">Installation and Configuration</h2>
<p>Installation on Fedora Server 36 is pretty easy:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>dnf install nut nut-client
</code></pre></div></div>

<p>Setting up <code class="language-plaintext highlighter-rouge">/etc/ups/nut.conf</code>, since I use it as a standalone server (without any other connected to it):</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>MODE=standalone
</code></pre></div></div>

<p>Quickly scanning for connected and supported devices: <code class="language-plaintext highlighter-rouge">nut-scanner -U</code> (<code class="language-plaintext highlighter-rouge">-U</code> scans only USB). It outputs a similar data to what we need in our next step. Just append a new UPS with <code class="language-plaintext highlighter-rouge">driver</code>, <code class="language-plaintext highlighter-rouge">port</code> and a small <code class="language-plaintext highlighter-rouge">desc</code>(ription) to <code class="language-plaintext highlighter-rouge">ups.conf</code>:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># /etc/ups/ups.conf

# appending driver/port combination with a short description
# nutdev1 was a suggestion by the scanner, it could be everything instead

[nutdev1]
	driver = "usbhid-ups"
	port = "auto"
	desc = "My small office server"
</code></pre></div></div>

<p>Setting up the <code class="language-plaintext highlighter-rouge">upsd</code> daemon to allow the local <code class="language-plaintext highlighter-rouge">upsmon</code> to access data (next step):</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># /etc/ups/upsd.conf
ACL all 0.0.0.0/0
ACL localhost 127.0.0.1/32

ACCESS grant monitor localhost
ACCESS deny all all
</code></pre></div></div>

<p>As well as a user (the password will be used only internally):</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># /etc/ups/upsd.users
[monuser]
        password = nieNg3eeHeixis1phooz
        allowfrom = localhost
        upsmon master

</code></pre></div></div>

<p>Optionally: If you want to access your UPS using an admin user (for instance controlling “the beep” or testing battery), you need an additional user:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>[admin]
        password = mypass
        actions = set
        instcmds = all
</code></pre></div></div>

<p>Finally setting up <code class="language-plaintext highlighter-rouge">upsmon</code> (with your <em>monuser</em> password):</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># /etc/ups/upsmon.conf
MONITOR nutdev1@localhost 1 monuser nieNg3eeHeixis1phooz master
</code></pre></div></div>

<h3 id="testing-the-configuration">Testing the configuration</h3>
<p>Running <code class="language-plaintext highlighter-rouge">upsc nutdev1</code> as user <code class="language-plaintext highlighter-rouge">nut</code> failed, telling me no device were found. A <code class="language-plaintext highlighter-rouge">nut-scanner -U</code> told me access denied.</p>

<p>In my case a quick <code class="language-plaintext highlighter-rouge">lsusb | grep -i UPS</code> provided:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Bus 005 Device 002: ID 0764:0601 Cyber Power System, Inc. UPS
</code></pre></div></div>

<p>So I need to allow user <code class="language-plaintext highlighter-rouge">nut</code> to access it. Using udev it’s pretty simple:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># /etc/udev/rules.d/90-nut-ups.rules
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0764", ATTR{idProduct}=="0601", MODE="0660", GROUP="nut"
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ udevadm control --reload-rules
$ udevadm trigger
</code></pre></div></div>

<p>Now test again:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>su nut --shell=/bin/bash
$ upsc nutdev1

# should start driver without errors, if fine, stop it (starting as systemd later).
$ upsdrvctl start 
$ upsdrvctl stop
</code></pre></div></div>

<p>Ready to run!</p>

<h3 id="start-nut">Start NUT</h3>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ systemctl enable nut-driver nut-server nut-monitor
$ systemctl start nut-driver nut-server nut-monitor
</code></pre></div></div>

<p>Finally, everything runs as expected</p>

<h3 id="testing-shutdown-cycle">Testing Shutdown Cycle</h3>
<p>To see if everything might work, you can run the following command, which will only display the commands to shutdown the system:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ upsdrvctl -t shutdown
</code></pre></div></div>

<p><code class="language-plaintext highlighter-rouge">-t</code> tells the command, to just <em>test</em> and output. Running without might actually shutdown your system. Be aware of data loss, if something isn’t correctly configured (since it might force the system to halt, after a configured timespan).</p>

<p>You could also use this command, to issue a “shutdown for all primary nodes” (<em>standalone</em> is a primary). Warning: this <em>will</em> halt your system - forcefully if needed(!):</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ upsmon -c fsd
</code></pre></div></div>

<h3 id="testing-power-outage">Testing Power Outage</h3>
<p>The final test is to unplug the cable of the UPS to see if the <code class="language-plaintext highlighter-rouge">upsmon</code> reacts correctly. It gracefully shut down my server after 40min (jup, my UPS is oversized). After that, my UPS shutdown, too.</p>

<p>Plugging the power cable in again resulted in a reboot of my server. All set!
If your server won’t start again, check BIOS settings to “restart on power loss”.</p>

<h3 id="references">References</h3>
<p>I used many references for this. Maybe one or two links might help you, too.</p>

<ul>
  <li><a href="https://networkupstools.org/documentation.html">Documentation on networkupstools.org</a></li>
  <li><a href="https://wiki.ipfire.org/addons/nut/detailed">Detailed NUT Configuration</a> on ipfire.org</li>
  <li><a href="https://fedoranews.org/contributors/kazutoshi_morioka/nut/">How to use UPS with nut</a> FedoraNews - 2004</li>
  <li><a href="https://thomas-leister.de/powerwalker-ups-debian-stretch/">Powerwalker UPS unter Debian 9 Stretch</a> (German) Thomas Leister - 2017</li>
  <li><a href="https://dan.langille.org/2020/09/07/monitoring-your-ups-using-nut-on-freebsd/">Monitoring your UPS using nut on FreeBSD</a> Dan Langille - 2020</li>
</ul>

<h2 id="next-steps">Next Steps</h2>
<ul>
  <li>Configure a monitoring dashboard in <a href="https://grafana.com/grafana/dashboards/12205">Grafana for visualization</a></li>
  <li>Alert me about outage (keep in mind: if there is no power, there is usually no router (and therefor no internet), too)</li>
  <li>Automatically setup using Ansible (for next time)</li>
</ul>

<h2 id="final-toughts">Final Toughts</h2>
<p>I’m really happy with my setup. It just works as expected and helps me getting good sleep at night, without worrying to loose my data ‘cause some neighbour hit the wall.</p>

<p>Now I need to measure the values of my UPS to store them in my metrics server for visualization later. Happily there is a simple tool for this: <code class="language-plaintext highlighter-rouge">upsc nutdev1</code> output quite everything!</p>]]></content><author><name>Michael Hirschler</name><email>michael@hirschler.solutions</email></author><category term="Server" /><category term="Fedora" /><summary type="html"><![CDATA[I recently bought a UPS for my small server setup. Setting it up to automatically shutdown my system in case of a power outage wasn’t that hard. Here is how.]]></summary></entry><entry><title type="html">Thumbor 7</title><link href="https://www.hirschler.solutions/posts/2022/02/thumbor-7" rel="alternate" type="text/html" title="Thumbor 7" /><published>2022-02-05T00:00:00+00:00</published><updated>2022-02-05T00:00:00+00:00</updated><id>https://www.hirschler.solutions/posts/2022/02/thumbor-7</id><content type="html" xml:base="https://www.hirschler.solutions/posts/2022/02/thumbor-7"><![CDATA[<p>I’m happy to announce the newest version of thumbor 7.0.0! It got release a while ago,
but I didn’t had time to update my <a href="https://hub.docker.com/r/mvhirsch/thumbor">docker images mvhirsch/thumber</a>
since then. This weekend I finally spent time updating the whole image, rebuilding it
from scratch to make it even more lightweight - reducing the size nearly to half
(comparing <code class="language-plaintext highlighter-rouge">6-slim</code> (770 MB) to <code class="language-plaintext highlighter-rouge">7:slim</code> (390 MB)).</p>

<p>I managed to make it smaller by fixing some issues and dropping <code class="language-plaintext highlighter-rouge">ffmpeg</code> from the base
image. That said, <code class="language-plaintext highlighter-rouge">ffmpeg</code> isn’t needed by default, since it’s only used by the
<code class="language-plaintext highlighter-rouge">gifv</code>-optimizer, which itself <a href="https://thumbor.readthedocs.io/en/latest/gifv.html">isn’t enabled by default</a>.
If you want to use the <code class="language-plaintext highlighter-rouge">thumbor.optimizer.gifv</code>, you can just add it yourself by
building your own docker image and activate gifv:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>FROM mvhirsch/thumbor:7-slim

RUN apt-get update \
    &amp;&amp; apt-get install --yes --quiet --no-install-recommends ffmpeg \
    &amp;&amp; rm -rf /var/lib/apt/lists/* \

ENV OPTIMIZERS "['thumbor.optimizers.jpegtran', 'thumbor.optimizer.gifv']"
</code></pre></div></div>

<p>The newest versions are already <a href="https://hub.docker.com/r/mvhirsch/thumbor">available to download</a>. Feel free to use them:</p>

<ul>
  <li><code class="language-plaintext highlighter-rouge">mvhirsch/thumbor:7-slim</code></li>
  <li><code class="language-plaintext highlighter-rouge">mvhirsch/thumbor:7-alpine</code></li>
  <li><code class="language-plaintext highlighter-rouge">mvhirsch/thumbor:7-fundamentals</code></li>
</ul>

<p>As always <code class="language-plaintext highlighter-rouge">mvhirsch/thubmor:7-fundamentals</code> comes pre-configured with an AWS S3 storage and <a href="https://pngquant.org/">pnquant</a> and <a href="https://mozjpeg.com/">mozjpeg</a>.
<code class="language-plaintext highlighter-rouge">pngquant</code> and <code class="language-plaintext highlighter-rouge">mozjpeg</code> are the recommended image optimizers for the web, reducing file size without quality loss.</p>

<p>If you experience any issues, don’t hesitate and <a href="https://github.com/mvhirsch/thumbor-docker">raise an issue</a> on github.</p>]]></content><author><name>Michael Hirschler</name><email>michael@hirschler.solutions</email></author><category term="Development" /><category term="Web Performance" /><category term="Docker" /><summary type="html"><![CDATA[I’m happy to announce the newest version of thumbor 7.0.0! It got release a while ago, but I didn’t had time to update my docker images mvhirsch/thumber since then. This weekend I finally spent time updating the whole image, rebuilding it from scratch to make it even more lightweight - reducing the size nearly to half (comparing 6-slim (770 MB) to 7:slim (390 MB)).]]></summary></entry><entry><title type="html">What every programmer should know about memory</title><link href="https://www.hirschler.solutions/posts/2020/12/memory" rel="alternate" type="text/html" title="What every programmer should know about memory" /><published>2020-12-30T00:00:00+00:00</published><updated>2020-12-30T00:00:00+00:00</updated><id>https://www.hirschler.solutions/posts/2020/12/memory</id><content type="html" xml:base="https://www.hirschler.solutions/posts/2020/12/memory"><![CDATA[<p>… it’s the exact right title. I found this jewel some time back, never got time to read it.
Finally the year’s over, found some time aaaand I’m impressed.</p>

<p>You (as a software developer) should read it, too.</p>

<p><a href="https://www.akkadia.org/drepper/cpumemory.pdf">What every programmer should know about memory</a></p>

<p>The document is a bit outdated, since it’s from 2007 - but still worth a reading.
Technology did evolve since, but the principals are still the same.</p>

<p>If you find a more recent version, please tell me.</p>

<h2 id="what-to-learn">What to learn?</h2>

<p>Basic understandings about static RAM and dynamic RAM (DRAM). How it evolved over time and how it works (especially on multi thread processors).</p>

<p>Practical tips on how to optimize memory usage for performance in C.</p>]]></content><author><name>Michael Hirschler</name><email>michael@hirschler.solutions</email></author><category term="Development" /><summary type="html"><![CDATA[… it’s the exact right title. I found this jewel some time back, never got time to read it. Finally the year’s over, found some time aaaand I’m impressed.]]></summary></entry><entry><title type="html">Stay Healthy</title><link href="https://www.hirschler.solutions/posts/2020/03/stay-healthy" rel="alternate" type="text/html" title="Stay Healthy" /><published>2020-03-22T00:00:00+00:00</published><updated>2020-03-22T00:00:00+00:00</updated><id>https://www.hirschler.solutions/posts/2020/03/stay-healthy</id><content type="html" xml:base="https://www.hirschler.solutions/posts/2020/03/stay-healthy"><![CDATA[<p>In times like this it’s always hard to keep motivated and healthy. COVID-19 (aka Corona) is still spreading, some people might live in fear, other people just forgot the importance to keep healthy.
Both mental and physical health is still important, even more important these days.</p>

<h1 id="video-call-your-friends-and-family">Video-Call your friends and family</h1>

<p>To keep yourself healthy and happy, it’s important to keep in mind: you are not alone. Phone your parents and family members (brothers, sisters, aunts, uncles, grandparents, …) as well as your friends. We live in a modern highly-technologized world where calling is as simple as writing a WhatsApp. Most of you still know how to dial a phone number ;-)</p>

<p>But also consider using video-calls (via WhatsApp, Jitsi, Hangouts, Facetime, …). Seeing your family and friends will make you and others happy. Talk with them.</p>

<p>To all parents out there: your parents want to see their grandchildren, too. Please do a regularly video-call with them.</p>

<h1 id="training-and-eating">Training and eating</h1>

<p>Stay healthy by train your body. Eat healthy things (like fruits) but also keep yourself happy by eating what you like (e.g. chocolate) - it’s still okay to do so!
Maybe you now have much more time as there are many countries (and many more might coming) are locking down. Now might be the right time to get yourself into shape, let’s start by searching on <a href="https://www.youtube.com/results?search_query=home+workout+for+beginners">Youtube</a>.</p>

<h1 id="do-something-meaningful">Do something meaningful</h1>

<p>Learn something new, like a new <a href="https://www.skillshare.com/">skill</a> or keep what you love (like reading (ebooks!), doing arts, doing sports, …). Please #StayAtHome.
There is plenty of online resources to get your mind and body in a fresh state.</p>

<p>And if you just want to be motivated, more and more artists are playing for you (yes you!) online: <a href="https://www.youtube.com/results?search_query=%23TogetherAtHome">Youtube #TogetherAtHome</a>.</p>

<p>Play with your kids, your spouse or other members at your home. Love them, they will love you, too.</p>]]></content><author><name>Michael Hirschler</name><email>michael@hirschler.solutions</email></author><category term="Personal" /><summary type="html"><![CDATA[In times like this it’s always hard to keep motivated and healthy. COVID-19 (aka Corona) is still spreading, some people might live in fear, other people just forgot the importance to keep healthy. Both mental and physical health is still important, even more important these days.]]></summary></entry><entry><title type="html">Alpine version of mvhirsch/thumbor now available!</title><link href="https://www.hirschler.solutions/posts/2019/03/alpine-version-mvhirsch-thumbor-now-available" rel="alternate" type="text/html" title="Alpine version of mvhirsch/thumbor now available!" /><published>2019-03-07T00:00:00+00:00</published><updated>2019-03-07T00:00:00+00:00</updated><id>https://www.hirschler.solutions/posts/2019/03/thumbor-alpine</id><content type="html" xml:base="https://www.hirschler.solutions/posts/2019/03/alpine-version-mvhirsch-thumbor-now-available"><![CDATA[<p>Thanks to the amazing <a href="https://github.com">Github Community</a> I’m now able to provide an Alpine image of <a href="https://hub.docker.com/r/mvhirsch/thumbor/tags">mvhirsch/thumbor:alpine</a>!
This image is even smaller, than <em>mvhirsch/thumbor:slim</em> due to the fact, that Alpine is smaller and needs even less dependencies.</p>

<p>Please feel free, to use this image and don’t forget to provide feedback and contribute: <a href="https://github.com/mvhirsch/thumbor-docker">github.com/mvhirsch/thumbor-docker</a></p>

<p>You like this image? Please star it on <a href="https://github.com/mvhirsch/thumbor-docker">Github</a> and <a href="https://hub.docker.com/r/mvhirsch/thumbor">Dockerhub</a>.</p>]]></content><author><name>Michael Hirschler</name><email>michael@hirschler.solutions</email></author><category term="Development" /><category term="Web Performance" /><category term="Docker" /><summary type="html"><![CDATA[Thanks to the amazing Github Community I’m now able to provide an Alpine image of mvhirsch/thumbor:alpine! This image is even smaller, than mvhirsch/thumbor:slim due to the fact, that Alpine is smaller and needs even less dependencies.]]></summary></entry><entry><title type="html">Caching vendor packages on CI</title><link href="https://www.hirschler.solutions/posts/2018/11/caching-vendor-packages-on-ci" rel="alternate" type="text/html" title="Caching vendor packages on CI" /><published>2018-11-08T00:00:00+00:00</published><updated>2018-11-08T00:00:00+00:00</updated><id>https://www.hirschler.solutions/posts/2018/11/better-ci-caching</id><content type="html" xml:base="https://www.hirschler.solutions/posts/2018/11/caching-vendor-packages-on-ci"><![CDATA[<p>Build duration is annoyingly slow?
Welcome to caching. In our .gitlab-ci.yaml it’s just a matter of</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cache:
  untracked: true
  paths:
    - node_modules/
</code></pre></div></div>

<p>and your next build will be sped up. Super cool, isn’t it?</p>

<h2 id="pitfalls">Pitfalls</h2>

<p>npm’s way to manage dependencies isn’t always deterministic and sometimes just do really weird. Especially if you mix versions like is it building on Node 8? Node 10? Node 11? In Gitlab-CI you just use different node-containers, they all come with different npm versions pre-packaged.
Would you like to manage different caches for it? Gitlab-CI does <a href="https://docs.gitlab.com/ci/yaml/#cachekey">support that</a>. Welcome to another dependency-maintenance hell.</p>

<p>What about upgrading some modules in a branch? Next time building <code class="language-plaintext highlighter-rouge">main</code> will it extract the newer version of that upgraded module? Will npm downgrade it? Are you really sure? Of course you can use <em>package-lock.json</em>. Good luck, tell me if you really happy with it.</p>

<h2 id="how-i-do-caching-in-gitlab-ci-using-npm">How I do caching in Gitlab-CI (using npm)</h2>

<p>Since my days using composer on PHP projects, it’s a naive advice to cache <em>node_modules/</em> (npm) and <em>vendor/</em> (composer). Even if the <a href="https://docs.gitlab.com/ci/caching/#cache-php-dependencies">official Gitlab-CI documentation</a> tells you to cache <em>node_modules/</em> and <em>vendor/</em>. It might be a different machine, different bindings, missing post-install scripts, version-mismatch or other.</p>

<p>Still I need performance, so what to cache? Did you know, npm has it’s own cache? By defaults it’s somewhere at <em>~/.npm/</em> (Linux). A simple command will show you: <code class="language-plaintext highlighter-rouge">npm cache verify</code></p>

<p>You can override it with an environment variable (or setting it in <em>~/.npmrc</em>). So my prefered way is to override npm’s cache and cache that folder in gitlab-ci-runners.
Please note that I’m using a relative path, since gitlab-ci-runners can only cache relative paths (not absolute ones).</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cache:
  paths:
    - .npm_cache/

variables:
  NPM_CONFIG_CACHE: ".npm_cache"
</code></pre></div></div>

<p>We can even do it better by telling npm to prefer that cache (it will still take a look at the npm registry, but prefers the downloaded file anyway):
<code class="language-plaintext highlighter-rouge">npm install --prefer-offline</code></p>

<h2 id="using-caching-for-php-using-composer">Using caching for PHP (using composer)</h2>

<p>Like above, I recommend caching composer’s cache directory instead:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>cache:
  paths:
    - .composer/cache

variables:
  COMPOSER_HOME: .composer
</code></pre></div></div>

<p>Happy Caching!</p>

<p>Update 2025: <a href="https://docs.gitlab.com/ci/caching/#cache-nodejs-dependencies">Gitlab recommend caching ~/.npm</a> now (previously <em>/node_modules</em>); but still recommends to cache <em>vendor/</em> for PHP projects.</p>]]></content><author><name>Michael Hirschler</name><email>michael@hirschler.solutions</email></author><category term="Development" /><summary type="html"><![CDATA[Build duration is annoyingly slow? Welcome to caching. In our .gitlab-ci.yaml it’s just a matter of]]></summary></entry><entry><title type="html">Thumbor Docker image for web performance</title><link href="https://www.hirschler.solutions/posts/2018/08/thumbor-docker-image-for-web-performance" rel="alternate" type="text/html" title="Thumbor Docker image for web performance" /><published>2018-08-28T00:00:00+00:00</published><updated>2018-08-28T00:00:00+00:00</updated><id>https://www.hirschler.solutions/posts/2018/08/thumbor-docker</id><content type="html" xml:base="https://www.hirschler.solutions/posts/2018/08/thumbor-docker-image-for-web-performance"><![CDATA[<p>In the last few days I was looking for a service, which should speed up my company’s website performance. One thing I needed, was an image optimization tool, which reduces image size based on various factors (jpeg/png, size, quality, …). While reading Google’s Web Fundamentals, I stumbled upon <a href="http://thumbor.org">Thumbor</a>. Such a nice little service which can be used as a proxy (like varnish) to optimize images on the run.</p>

<p>After reading the documentation, I was quickly looking for a Docker image to play around. Sadly, there is no official one.
I found two others: APSL and MinimalCompact which did a great job providing a Docker image and fullfilling my needs. Indeed, both images just work fine. But there is more.</p>

<h1 id="docker-should-be-small">Docker should be small</h1>

<p>As for all in Docker, every image should one run <em>one process</em> (not <a href="https://github.com/MinimalCompact/thumbor/blob/master/thumbor/Dockerfile#L60">running circus</a>, which can be configured to run multiple instances of a process). Again, it just works, but it’s bloated.</p>

<p>After looking at the dependencies of both images, I made a decision: both images are good to go, but for my opinion, quiet to large (in size and dependencies).
So I decided to build my own.</p>

<p>Finally, my first public Docker image arrived: <a href="https://hub.docker.com/r/mvhirsch/thumbor/">mvhirsch/thumbor</a></p>

<p>It comes with the smallest footprint of dependencies I was able to manage (650 MiB instead 1.7 GiB). Still, there is room for improvement (like a planned <code class="language-plaintext highlighter-rouge">alpine</code> version of it). But I’m happy to announce a fully working, just scaleable Docker image. Feel free to contribute: https://github.com/mvhirsch/thumbor-docker</p>]]></content><author><name>Michael Hirschler</name><email>michael@hirschler.solutions</email></author><category term="Development" /><category term="Web Performance" /><category term="Docker" /><summary type="html"><![CDATA[In the last few days I was looking for a service, which should speed up my company’s website performance. One thing I needed, was an image optimization tool, which reduces image size based on various factors (jpeg/png, size, quality, …). While reading Google’s Web Fundamentals, I stumbled upon Thumbor. Such a nice little service which can be used as a proxy (like varnish) to optimize images on the run.]]></summary></entry><entry><title type="html">#WeAreDevs Vienna 2018</title><link href="https://www.hirschler.solutions/posts/2018/05/we-are-develpers-vienna-2018" rel="alternate" type="text/html" title="#WeAreDevs Vienna 2018" /><published>2018-05-21T00:00:00+00:00</published><updated>2018-05-21T00:00:00+00:00</updated><id>https://www.hirschler.solutions/posts/2018/05/wearedevs-vienna-2018-recap</id><content type="html" xml:base="https://www.hirschler.solutions/posts/2018/05/we-are-develpers-vienna-2018"><![CDATA[<p>So, last week I went to the <del>#WeAreHiring</del>; no wait a sec’, that’s not it’s real name. Give me a second … <del>#WeAreAdvertising</del>? Oh, it’s just <em>WeAreDevelopers World Congress Vienna 2018</em>! Yes, definitely #WeAreDevs. You know, the congress with Steve <em>the Woz</em> Wozniak, some guys from Microsoft, Google and so on.</p>

<blockquote>
  <p>Sacrificing the golden calf of coding
– Christian Heilmann</p>
</blockquote>

<p>Why the confused name …? Because I really thought it’s all about software engineering, development, testing, building cool things (like gems or toys or mobile apps). Surprisingly it’s more about hiring people, which is just annoying - especially if you wanted to learn cool new stuff about software development or make new friendships by hacking code together.</p>

<h1 id="the-congress">The Congress</h1>

<p>Starting with Steve Wozniak about all and everything within uprising technology (you might be able to watch it on Youtube, too), the congress started well with over 8.000 people attending to 6 stages with different talks. Speaking about Stories, Backend and Frontend development, automation, VR, Security, Testing and lots of other interesting things. So I started into a good session, full of interesting people to listen to!
I heard about nginx unit, apache kafka, managing cloud deployments well, beeing better at development, doing nodejs right, - there was a lot of awesome talkers to hear!</p>

<p>A talk that I got inspired was <a href="https://christianheilmann.com/">Christian Heilmann’s</a> <em>Sacrificing the golden calf of coding</em>. It’s all about software engineering and to use software (development) right. Because why bother with the legendary <em>Tabs vs Spaces</em> anyway? Stop rebuilding/redefining your work; there even is a machine-learning tool building <a href="https://github.com/emilwallner/Screenshot-to-code-in-Keras">HTML based on your screenshots</a>.</p>

<p>Another interesting talk was given by <a href="https://twitter.com/nikkitaftw">Sara Viera</a> <em>Your brain does not have a fix flag</em>, inspired by <code class="language-plaintext highlighter-rouge">eslint --fix</code>. What a genius funny little women!</p>

<h2 id="the-good-and-the-bad-things">The good and the bad things</h2>

<p>Something very crude was: hey guys, I heard you like to go home early, so we stopped serving coffee since 3pm. Just why? The planned congress appears to be 6pm. Do you want provoke the mob?</p>

<p>Something I want to applaud at is the performance of the wifi. I’ve never seen such a big congress, with a working wifi, but this time it was all about performing well and absolutely solid. But, why the heck did you need to remove the wifi password for all attendees on the second day? Aren’t developers able to type in a simple wifi password (seen on every displayed across the whole location)?</p>

<blockquote>
  <p>Do you want to work with us?</p>
</blockquote>

<p>Apart from the talks on stage, there was a lot to discover on the congress: many companies showed off some technologies and frameworks they work with. And like many, they wanted everyone to work with them. No sorry, I just wanted to look at what you’re building right here (a duck on the monitor is an eye-catcher - thank you for trapping me in). So everywhere I looked or I went they wanted to hire me. By the way, I’m happy at my work and I don’t want to leave.</p>

<p>After all, I saw many people at the conference, talk to most of them and were able to learn some nice tricks. At all, it was a success for me, but I think I’ll never attend (as an attendee) to the WeAreDevelpers World Congress again.</p>]]></content><author><name>Michael Hirschler</name><email>michael@hirschler.solutions</email></author><category term="Conference" /><summary type="html"><![CDATA[So, last week I went to the #WeAreHiring; no wait a sec’, that’s not it’s real name. Give me a second … #WeAreAdvertising? Oh, it’s just WeAreDevelopers World Congress Vienna 2018! Yes, definitely #WeAreDevs. You know, the congress with Steve the Woz Wozniak, some guys from Microsoft, Google and so on.]]></summary></entry></feed>