<?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: Sergej Brazdeikis</title>
    <description>The latest articles on DEV Community by Sergej Brazdeikis (@sergej_brazdeikis).</description>
    <link>https://dev.to/sergej_brazdeikis</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%2F136938%2F8daf4a45-3721-4855-ad98-288011b59bda.JPG</url>
      <title>DEV Community: Sergej Brazdeikis</title>
      <link>https://dev.to/sergej_brazdeikis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sergej_brazdeikis"/>
    <language>en</language>
    <item>
      <title>TIL: Docker Logging with Loki and Grafana on Synology</title>
      <dc:creator>Sergej Brazdeikis</dc:creator>
      <pubDate>Thu, 27 Oct 2022 14:29:42 +0000</pubDate>
      <link>https://dev.to/sergej_brazdeikis/docker-logging-with-loki-on-synology-34d0</link>
      <guid>https://dev.to/sergej_brazdeikis/docker-logging-with-loki-on-synology-34d0</guid>
      <description>&lt;p&gt;Recently I wanted to set up and explore a logging tool for Docker, so all the logs would go into one location. After a quick research, I decided to try out &lt;a href="https://grafana.com/oss/loki/"&gt;Loki&lt;/a&gt;. It natively integrates with Grafana and has Prometheus vibes :)&lt;/p&gt;

&lt;h2&gt;
  
  
  Loki and Docker setup
&lt;/h2&gt;

&lt;p&gt;Let's install the Loki and Grafana combination via Docker compose &lt;a href="https://raw.githubusercontent.com/grafana/loki/v2.6.1/production/docker-compose.yaml"&gt;I used this template&lt;/a&gt; from the official Loki GitHub repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3"&lt;/span&gt;

&lt;span class="na"&gt;networks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;loki&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;

&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;loki&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grafana/loki:2.6.0&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3100:3100"&lt;/span&gt;
    &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;-config.file=/etc/loki/local-config.yaml&lt;/span&gt;
    &lt;span class="na"&gt;networks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;loki&lt;/span&gt;

  &lt;span class="na"&gt;promtail&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grafana/promtail:2.6.0&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/var/log:/var/log&lt;/span&gt;
    &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;-config.file=/etc/promtail/config.yml&lt;/span&gt;
    &lt;span class="na"&gt;networks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;loki&lt;/span&gt;

  &lt;span class="na"&gt;grafana&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;grafana/grafana:latest&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;3000:3000"&lt;/span&gt;
    &lt;span class="na"&gt;networks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;loki&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also comes with &lt;code&gt;promtail&lt;/code&gt;, which pipes the system logs into Loki.&lt;/p&gt;

&lt;p&gt;For the first login into Grafana - use admin for username and password. &lt;/p&gt;

&lt;h2&gt;
  
  
  Configure Docker to route logs to Loki
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Install Docker Loki plugin
&lt;/h3&gt;

&lt;p&gt;Grafana Loki supports Docker plugin and integrates natively with it.&lt;/p&gt;

&lt;p&gt;There is Docker plugin which simplifies log routing. To install it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker plugin &lt;span class="nb"&gt;install &lt;/span&gt;grafana/loki-docker-driver:latest &lt;span class="nt"&gt;--alias&lt;/span&gt; loki &lt;span class="nt"&gt;--grant-all-permissions&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Configure Docker to route logs to Loki
&lt;/h3&gt;

&lt;p&gt;For this, we need to locate &lt;code&gt;dockerd.json&lt;/code&gt;. It may be in different locations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Linux default location: &lt;code&gt;/etc/docker/daemon.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Synology:  &lt;code&gt;/var/packages/Docker/etc/dockerd.json&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Create or alter &lt;code&gt;dockerd.json&lt;/code&gt; to include the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"log-driver"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"loki"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"log-opts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"loki-url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://localhost:3100/loki/api/v1/push"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Restart Docker Daemon
&lt;/h3&gt;

&lt;p&gt;It may vary depending on your system:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Linux:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Synology:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;synopkgctl stop Docker
&lt;span class="nb"&gt;sudo &lt;/span&gt;synopkgctl start Docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Test Loki Docker configuration
&lt;/h3&gt;

&lt;p&gt;All newly started containers will pick up new configuration. You can quickly check the current configuration of the running container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; docker inspect &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s1"&gt;'{{.HostConfig.LogConfig}}'&lt;/span&gt; &lt;span class="nv"&gt;$YOUR_CONTAINER_ID&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;loki map[loki-url:http://localhost:3100/loki/api/v1/push]&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;P.S. &lt;code&gt;docker ps&lt;/code&gt; to get the list of running containers. Just in case ;)&lt;/p&gt;

&lt;h3&gt;
  
  
  Confuguring Grafana to query logs
&lt;/h3&gt;

&lt;p&gt;For this part of the docs, I think it is best to use the official page since it is clearly described here - &lt;a href="https://grafana.com/docs/loki/latest/operations/grafana/"&gt;Configure Loki as a source in Grafana&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Reference Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://grafana.com/docs/loki/latest/clients/docker-driver/"&gt;Grafana Loki Docker Drive Client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://grafana.com/docs/loki/v2.6.x/operations/grafana/"&gt;Grafana docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>docker</category>
      <category>loki</category>
      <category>synology</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>TIL: Fix for MariaDb docker "incorrect definition of table" errors</title>
      <dc:creator>Sergej Brazdeikis</dc:creator>
      <pubDate>Thu, 27 Oct 2022 07:29:46 +0000</pubDate>
      <link>https://dev.to/sergej_brazdeikis/til-fix-for-mariadb-docker-incorrect-definition-of-table-errors-4ge8</link>
      <guid>https://dev.to/sergej_brazdeikis/til-fix-for-mariadb-docker-incorrect-definition-of-table-errors-4ge8</guid>
      <description>&lt;p&gt;I recently upgraded MariaDB Docker image, and everything went well because everything worked. It was until I checked the logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;...
2022-10-26 19:30:12 17 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
2022-10-26 19:30:12 17 [ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I was confused, and then I found the fix I needed. Add this ENV variable to fix it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;MARIADB_AUTO_UPGRADE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;1'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;for me it did fix the issue. Note:** Backup your data first!**&lt;br&gt;
Read further if you want to learn what it does :)&lt;/p&gt;

&lt;p&gt;I used &lt;code&gt;mariadb:latest&lt;/code&gt; image from official &lt;a href="https://hub.docker.com/_/mariadb"&gt;DockerHub&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  MARIADB_AUTO_UPGRADE explained
&lt;/h2&gt;

&lt;p&gt;After quick checking, I found the explanation on GitHub repo &lt;a href="https://github.com/docker-library/docs/blob/1cdff027b06f7f559e79be3eda9b62aa2b565c46/mariadb/README.md#mariadb_auto_upgrade--mariadb_disable_upgrade_backup"&gt;here&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Set MARIADB_AUTO_UPGRADE to a non-empty value to have the entrypoint check whether mysql_upgrade/mariadb-upgrade needs to run, and if so, run the upgrade before starting the MariaDB server.&lt;/p&gt;

&lt;p&gt;Before the upgrade, a backup of the system database is created in the top of the datadir with the name system_mysql_backup_*.sql.zst. This backup process can be disabled with by setting MARIADB_DISABLE_UPGRADE_BACKUP to a non-empty value.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  What MARIADB_AUTO_UPGRADE actually does
&lt;/h2&gt;

&lt;p&gt;The repository for the docker image is &lt;a href="https://github.com/MariaDB/mariadb-docker"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And here is a snippet of what it does (&lt;a href="https://github.com/MariaDB/mariadb-docker/blob/45bb36b2292191a93d2b7a0a4d0eafaa554ba8d5/10.10/docker-entrypoint.sh#L425"&gt;permalink to Maria DB 10.10&lt;/a&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    mysql_note &lt;span class="s2"&gt;"Starting temporary server"&lt;/span&gt;
    docker_temp_server_start &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$@&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="nt"&gt;--skip-grant-tables&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="nt"&gt;--loose-innodb_buffer_pool_dump_at_shutdown&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0 &lt;span class="se"&gt;\&lt;/span&gt;
        &lt;span class="nt"&gt;--skip-slave-start&lt;/span&gt;
    mysql_note &lt;span class="s2"&gt;"Temporary server started."&lt;/span&gt;

    docker_mariadb_backup_system

    mysql_note &lt;span class="s2"&gt;"Starting mariadb-upgrade"&lt;/span&gt;
    mariadb-upgrade &lt;span class="nt"&gt;--upgrade-system-tables&lt;/span&gt;
    mysql_note &lt;span class="s2"&gt;"Finished mariadb-upgrade"&lt;/span&gt;

    mysql_note &lt;span class="s2"&gt;"Stopping temporary server"&lt;/span&gt;
    docker_temp_server_stop
    mysql_note &lt;span class="s2"&gt;"Temporary server stopped"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So as simple as it is, it does upgrade :)&lt;/p&gt;

&lt;p&gt;Keep your data safe, do backup and test your backups! #peace&lt;/p&gt;

</description>
      <category>mariadb</category>
      <category>docker</category>
      <category>todayilearned</category>
    </item>
    <item>
      <title>Software Engineer to Engineering Manager. Should I?</title>
      <dc:creator>Sergej Brazdeikis</dc:creator>
      <pubDate>Sun, 06 Feb 2022 11:28:37 +0000</pubDate>
      <link>https://dev.to/sergej_brazdeikis/software-engineer-to-engineering-manager-should-i-g17</link>
      <guid>https://dev.to/sergej_brazdeikis/software-engineer-to-engineering-manager-should-i-g17</guid>
      <description>&lt;p&gt;You think about the manager path, and you see there is an opportunity, And you just can't put the dot on the decision. Let's explore it together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Assess the motivation
&lt;/h2&gt;

&lt;p&gt;Before doing it, first, explore why do want to do it? Writes down some notes for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why do I think about it?&lt;/li&gt;
&lt;li&gt;Do I imagine what the engineering manager role is?&lt;/li&gt;
&lt;li&gt;Do I like it?&lt;/li&gt;
&lt;li&gt;Am I curious to try it?&lt;/li&gt;
&lt;li&gt;What benefits and disadvantages do you see?&lt;/li&gt;
&lt;li&gt;There will be a lot to learn. Do I want to commit?&lt;/li&gt;
&lt;li&gt;How do I see myself in two years? Five years?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Engineering manager. Should I switch from the engineer?
&lt;/h2&gt;

&lt;p&gt;If you are curious to try it - do it. &lt;/p&gt;

&lt;p&gt;When switched from an engineer to a more managerial role, I had to think on a team level. The very definition of success changed - now it is team success. System thinking on the team level is a daily exercise.&lt;/p&gt;

&lt;p&gt;I also had to improve my soft skill tools. What I tell, how I speak, approach problems, react, behave, etc. All this suddenly had a way bigger impact. I learned many essential things about it for me as a manager. This experience had a very positive effect on my personality.&lt;/p&gt;

&lt;p&gt;There are many other minor benefits from only getting this experience as an engineer and a person. This experience to look at teamwork from different expertise is invaluable.&lt;/p&gt;

&lt;h2&gt;
  
  
  It is not a promotion
&lt;/h2&gt;

&lt;p&gt;Be aware of this! It is not a promotion - it is a track change!&lt;br&gt;
When you switch from engineer to manager, you are a Junior Engineering manager. And it is fair. Folks who support your growth see you in that role. &lt;/p&gt;

&lt;h2&gt;
  
  
  Amount of coding
&lt;/h2&gt;

&lt;p&gt;Hands-on is a very tricky topic. I can tell it is all in your hands, and it is tough to balance coding and accelerated growth as starting manager. I'm sure you will have to find the best balance for you while on the job, which approach works for you the best.&lt;/p&gt;

&lt;p&gt;One thing is vital to say, as your responsibility will not be purely code related, we will have to delegate coding tasks on critical implementation path to full-time software engineers. This way, your other tasks as manager will not negatively impact the whole team's performance. I'm not saying you cannot do this, be aware of it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Success for an Engineering Manager?
&lt;/h2&gt;

&lt;p&gt;All managers are on a different path—some in first years, fifth or maybe tenth year. Our views will change during the trip, how we do stuff changes. Today I personally, the successful engineering manager is the one who facilitates the team to be successful. And we are accountable for that.&lt;/p&gt;

&lt;p&gt;Today how I see the success for a team:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Software engineering team delivers measurable impact to end-users and business.&lt;/li&gt;
&lt;li&gt;The team is motivated, engaged and happy. Team members are open and tell that it is a team, not just a group of people.&lt;/li&gt;
&lt;li&gt;The team is excellent from the DORA metrics perspective&lt;/li&gt;
&lt;li&gt;The team grows skills, and as the team as each personally.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If interested, I suggest reading about &lt;a href="https://www.amazon.com/Five-Dysfunctions-Team-Leadership-Fable/dp/0787960756"&gt;The Five Dysfunctions of a Team: A Leadership Fable &lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The window of opportunity for about two years
&lt;/h2&gt;

&lt;p&gt;Even if you find out later that it is not for you - you can switch back to a single contributor. &lt;/p&gt;

&lt;p&gt;Two years is a window opportunity because your coding skills will not have a chance to disappear; you, in any case, are still as an engineer as today. And the switchback will be smooth.&lt;/p&gt;

&lt;p&gt;Worth mentioning that you will never really fully come back to a single contributor mindset after switching back. You will think on a team level. It is a permanent upgrade :) &lt;/p&gt;

&lt;p&gt;The only possible downside is that you can potentially get not up to speed with the latest technologies. The reason is that you will have a lot to learn within your new role. When you switch back to engineer - you quickly catch up, and if you continue being a manager - you find a way to keep up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engineering manager salary
&lt;/h2&gt;

&lt;p&gt;It is a natural motivator to scale. I want to clear one thing right away - if you think or find out that this is not your thing, there is no point living in pain. As a single contributor, you can grow further on the Software expert track. Staff engineers, Senior Staff Engineers, Architect roles are parallel growth tracks, and salary matches or, in some cases, surpasses the manager's path. &lt;/p&gt;

&lt;p&gt;It is all about how good you are, your passion, and your role impact. Great Software engineers in the right company grow and significantly positively impact engineering quality.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consult with a good manager
&lt;/h2&gt;

&lt;p&gt;Talk to respected by you the manager, who you think it could be a good reference. A good manager will tell you how it is in the first person. What are the joys, the challenges, and what are the downsides? The experience can vary a lot. Ask a few managers to form a better understanding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of the Engineering manager role
&lt;/h2&gt;

&lt;p&gt;Here is a good dedicated blog post about it &lt;a href="https://www.patkua.com/blog/5-engineering-manager-archetypes/"&gt;5 Engineering Manager Archetypes&lt;/a&gt; from &lt;a href="https://www.patkua.com/about/"&gt;Pat Kua&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you choose to try it out, you will learn more techniques, like situational leadership and different ways to depend on the team state.&lt;/p&gt;

&lt;p&gt;It is a rabbit hole on its own, and it is a beautiful path.&lt;/p&gt;

&lt;h2&gt;
  
  
  It is your decision
&lt;/h2&gt;

&lt;p&gt;Whatever you decide is your choice, what path to go forward or when to do it. Do not get others to do it for you.&lt;/p&gt;

&lt;p&gt;Enjoy the path you choose! It is most probably the right one :)&lt;/p&gt;

</description>
      <category>career</category>
    </item>
    <item>
      <title>Install Docker on Mac M1 without Docker Desktop</title>
      <dc:creator>Sergej Brazdeikis</dc:creator>
      <pubDate>Sat, 29 Jan 2022 20:20:54 +0000</pubDate>
      <link>https://dev.to/sergej_brazdeikis/install-docker-on-mac-m1-without-docker-desktop-k6o</link>
      <guid>https://dev.to/sergej_brazdeikis/install-docker-on-mac-m1-without-docker-desktop-k6o</guid>
      <description>&lt;p&gt;Docker Desktop is the default way to get &lt;code&gt;docker&lt;/code&gt; on your machine, and when you search, it suggests installing it. To find the documentation to do it differently - is a hassle. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It remains free for small businesses (fewer than 250 employees AND less than $10 million in annual revenue), personal use, education, and non-commercial open-source projects.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here I'm sharing the simplest way to go around it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Docker on Mac with no Docker Desktop
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

brew install docker docker-compose


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Docker Compose on Mac without Docker Desktop
&lt;/h2&gt;

&lt;p&gt;After installing the Docker, you will see the message.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

Compose is now a Docker plugin. For Docker to find this plugin, symlink it:
  mkdir -p ~/.docker/cli-plugins
  ln -sfn /opt/homebrew/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Just execute the above, and we did not finish yet!&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;h2&gt;
  
  
  Free Replacement Docker Desktop
&lt;/h2&gt;

&lt;p&gt;Docker Desktop installs Docker Engine, which can run only on Linux. So far, we have installed only CLI tools. For images to run, we need an environment.&lt;/p&gt;

&lt;p&gt;Rancher Desktop replaces Docker Desktop! Happily to &lt;a href="https://rancherdesktop.io/" rel="noopener noreferrer"&gt;Rancher Desktop v1.0.0&lt;/a&gt; was just released with M1 chip compatibility and solved this problem for us!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you are on the Mac with an M1 chip, download the file with &lt;code&gt;...mac.aarch64.zip&lt;/code&gt; from&lt;br&gt;
&lt;a href="https://github.com/rancher-sandbox/rancher-desktop/releases" rel="noopener noreferrer"&gt;releases page on GitHub&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.brazdeikis.io%2F_next%2Fimage%3Furl%3D%252Fuploads%252Francherdesktop.png%26w%3D1920%26q%3D75" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.brazdeikis.io%2F_next%2Fimage%3Furl%3D%252Fuploads%252Francherdesktop.png%26w%3D1920%26q%3D75" alt="Rancher Desktop Dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Rancher Desktop No access error
&lt;/h2&gt;

&lt;p&gt;In case you are a missing directory or existing directory permissions will not compatible, run these:&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&lt;p&gt;sudo mkdir /usr/local/bin&lt;br&gt;
sudo chown $USER /usr/local/bin&lt;/p&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Other Docker Desktop alternatives&lt;br&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Docker + Hyperkit + Minikube: does not work on M1 Macs&lt;/li&gt;
&lt;li&gt;Podman - lacks of ability to mount volumes from the host OS&lt;/li&gt;
&lt;li&gt;Lima + nerdctl - It is not really a docker&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>apple</category>
      <category>devops</category>
    </item>
    <item>
      <title>Strapi v4 setup with Docker Compose and MySQL</title>
      <dc:creator>Sergej Brazdeikis</dc:creator>
      <pubDate>Wed, 22 Dec 2021 15:31:53 +0000</pubDate>
      <link>https://dev.to/sergej_brazdeikis/strapi-v4-setup-with-docker-compose-and-mysql-5f8a</link>
      <guid>https://dev.to/sergej_brazdeikis/strapi-v4-setup-with-docker-compose-and-mysql-5f8a</guid>
      <description>&lt;p&gt;I have to say it was confusing - today existing docker image &lt;code&gt;strapi/strapi&lt;/code&gt; has v3 under the hood and there is no simple way or docs to install Strapiv4 via Docker Compose.&lt;/p&gt;

&lt;p&gt;Today the only way to create new project Strapi v4 is to use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-strapi-app@latest strapi-project &lt;span class="nt"&gt;--quickstart&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and use it natively with node with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run develop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Today, I'm sharing my solution with Docker-compose.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create Strapi project via Docker
&lt;/h2&gt;

&lt;p&gt;Install Strapi project files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;set node version. Here is version 16.&lt;/li&gt;
&lt;li&gt;set project name. I use &lt;code&gt;strapi-project&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-it&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nv"&gt;$PWD&lt;/span&gt;:/data&lt;span class="se"&gt;\&lt;/span&gt;
    &lt;span class="nt"&gt;-w&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/data&lt;span class="se"&gt;\&lt;/span&gt;
    node:16-alpine sh &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"yes | npx create-strapi-app@latest strapi-project --no-run --dbclient=mysql --dbhost=mariadb --dbport=3306 --dbname=strapi --dbusername=strapi --dbpassword=strapi"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All those CLI options are listed here on the  Strapi Github repo - &lt;a href="https://github.com/strapi/strapi/blob/e2cd01e8c6cbfeba15ad7787e38b6eebcbb92221/packages/cli/create-strapi-app/create-strapi-app.js" rel="noopener noreferrer"&gt;packages/cli/create-strapi-app/create-strapi-app.js&lt;/a&gt; With these options the configuration is setup correctly, together with the right database driver in &lt;code&gt;package.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nl"&gt;"dependencies"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"mysql"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2.18.1"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;...&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Launch with Docker compose with Mysql together
&lt;/h2&gt;

&lt;p&gt;Then lets launch the docker compose. Here as an option I use MariaDb as a choise.&lt;/p&gt;

&lt;p&gt;For reference I used this folder structure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.brazdeikis.io%2Fassets%2Fblog%2Fstrapi-v4-docker-compose%2FStrapi-docker-file-structure.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fblog.brazdeikis.io%2Fassets%2Fblog%2Fstrapi-v4-docker-compose%2FStrapi-docker-file-structure.png" alt="Strapi Docker Compose folder structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Use following &lt;code&gt;docker-compose.yml&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;3'&lt;/span&gt;
&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;strapi&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;node:16-alpine&lt;/span&gt;
    &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm run develop&lt;/span&gt;
    &lt;span class="na"&gt;labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;com.example.description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Strapi&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;project"&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;DATABASE_CLIENT&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mysql&lt;/span&gt;
      &lt;span class="na"&gt;DATABASE_HOST&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mariadb&lt;/span&gt;
      &lt;span class="na"&gt;DATABASE_PORT&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3306&lt;/span&gt;
      &lt;span class="na"&gt;DATABASE_NAME&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;strapi&lt;/span&gt;
      &lt;span class="na"&gt;DATABASE_USERNAME&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;strapi&lt;/span&gt;
      &lt;span class="na"&gt;DATABASE_PASSWORD&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;strapi&lt;/span&gt;
      &lt;span class="na"&gt;DATABASE_SSL&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;false'&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./strapi-project:/data&lt;/span&gt;
    &lt;span class="na"&gt;working_dir&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/data&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;1337:1337'&lt;/span&gt;
    &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;mariadb&lt;/span&gt;

  &lt;span class="na"&gt;mariadb&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;mariadb&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./mariadb:/var/lib/mysql&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;MYSQL_ROOT_PASSWORD&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;strapi&lt;/span&gt;
      &lt;span class="na"&gt;MYSQL_DATABASE&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;strapi&lt;/span&gt;
      &lt;span class="na"&gt;MYSQL_USER&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;strapi&lt;/span&gt;
      &lt;span class="na"&gt;MYSQL_PASSWORD&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;strapi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Deploy with Docker compose to the production environment
&lt;/h2&gt;

&lt;p&gt;For production deployment - please change the passwords above. &lt;/p&gt;

&lt;p&gt;Also, it seems Strapi suggests using &lt;code&gt;strapi start&lt;/code&gt; instead as launch command.&lt;/p&gt;

&lt;p&gt;Happy content creation!&lt;/p&gt;

</description>
      <category>strapi</category>
      <category>dockercompose</category>
      <category>docker</category>
      <category>mysql</category>
    </item>
  </channel>
</rss>
