<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Alperen Doc</title><link>https://blog.ulutasalperen.com/</link><description>Recent content on Alperen Doc</description><generator>Hugo</generator><language>en</language><atom:link href="https://blog.ulutasalperen.com/index.xml" rel="self" type="application/rss+xml"/><item><title>basic_git_conf</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/basic_git_conf/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/basic_git_conf/</guid><description>&lt;p&gt;Git username &amp;amp; git email conf&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git config --add --global user.name &lt;span style="color:#e6db74"&gt;&amp;#34;github_username_here&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git config --add --global user.email &lt;span style="color:#e6db74"&gt;&amp;#34;email@example.com&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Git github default branc&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git config --global init.defaultBranch main&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;CLI ile login ol&lt;/strong&gt;&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;gh auth login&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>docker-kurulum-hardening-debian</title><link>https://blog.ulutasalperen.com/docs/docker/docker-kurulum-hardening-debian/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/docker-kurulum-hardening-debian/</guid><description>&lt;h3 id="debian-13-için-güvenli-docker-ve-docker-compose-kurulum-dokümantasyonu"&gt;Debian 13 İçin Güvenli Docker ve Docker Compose Kurulum Dokümantasyonu&lt;a class="anchor" href="#debian-13-i%c3%a7in-g%c3%bcvenli-docker-ve-docker-compose-kurulum-dok%c3%bcmantasyonu"&gt;#&lt;/a&gt;&lt;/h3&gt;&#10;&lt;h4 id="1-sistem-hazırlığı-ve-bağımlılıklar"&gt;1. Sistem Hazırlığı ve Bağımlılıklar&lt;a class="anchor" href="#1-sistem-haz%c4%b1rl%c4%b1%c4%9f%c4%b1-ve-ba%c4%9f%c4%b1ml%c4%b1l%c4%b1klar"&gt;#&lt;/a&gt;&lt;/h4&gt;&#10;&lt;p&gt;Kuruluma başlamadan önce sistemin güncel olduğundan ve paketleri HTTPS üzerinden alabilmek için gerekli araçların yüklendiğinden emin oluyoruz.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt update &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; sudo apt upgrade -y&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo apt install -y ca-certificates curl gnupg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id="2-resmi-docker-deposu-ve-gpg-anahtarının-eklenmesi"&gt;2. Resmi Docker Deposu ve GPG Anahtarının Eklenmesi&lt;a class="anchor" href="#2-resmi-docker-deposu-ve-gpg-anahtar%c4%b1n%c4%b1n-eklenmesi"&gt;#&lt;/a&gt;&lt;/h4&gt;&#10;&lt;p&gt;Paketlerin bütünlüğünü doğrulamak için Docker&amp;rsquo;ın resmi GPG anahtarını eklemek güvenlik açısından zorunludur.&lt;/p&gt;&#10;&lt;p&gt;GPG anahtarını indirip yapılandırıyoruz:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo install -m &lt;span style="color:#ae81ff"&gt;0755&lt;/span&gt; -d /etc/apt/keyrings&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo rm -f /etc/apt/keyrings/docker.gpg&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo chmod a+r /etc/apt/keyrings/docker.gpg&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote class='book-hint '&gt;&#10;&lt;p&gt;&lt;code&gt;rm -f&lt;/code&gt; satırını ekledik çünkü anahtar daha önce indirilmişse &lt;code&gt;gpg --dearmor -o&lt;/code&gt; komutu &amp;ldquo;File exists&amp;rdquo; hatası verir. Bu sayede komut güvenle tekrar çalıştırılabilir.&lt;/p&gt;</description></item><item><title>basic_git_knowledge</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/basic_git_knowledge/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/basic_git_knowledge/</guid><description>&lt;h1 id="simplified-git-commands-guide"&gt;Simplified Git Commands Guide&lt;a class="anchor" href="#simplified-git-commands-guide"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;h2 id="initialize-a-git-repository"&gt;Initialize a Git Repository&lt;a class="anchor" href="#initialize-a-git-repository"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Navigate to the directory you want to track.&lt;/li&gt;&#10;&lt;li&gt;Run the following command:&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git init&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="adding-files-or-directories"&gt;Adding Files or Directories&lt;a class="anchor" href="#adding-files-or-directories"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;To add files or directories to the staging area, use:&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git add &amp;lt;file_or_directory_name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="git-add/"&gt;git add&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="checking-the-current-state"&gt;Checking the Current State&lt;a class="anchor" href="#checking-the-current-state"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;To see the current state of your repository:&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git status&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="git-status/"&gt;git status&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="committing-changes"&gt;Committing Changes&lt;a class="anchor" href="#committing-changes"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;To save changes to the repository:&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git commit -m &lt;span style="color:#e6db74"&gt;&amp;#34;Your commit message&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="git-commit/"&gt;git commit&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="branch-management"&gt;Branch Management&lt;a class="anchor" href="#branch-management"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;h3 id="creating-and-switching-to-a-new-branch"&gt;Creating and Switching to a New Branch&lt;a class="anchor" href="#creating-and-switching-to-a-new-branch"&gt;#&lt;/a&gt;&lt;/h3&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Use the following command to create and switch to a new branch:&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git switch -c my_new_branch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;This is easier than using &lt;code&gt;git branch&lt;/code&gt; followed by &lt;code&gt;git switch&lt;/code&gt;.&lt;/em&gt; &lt;a href="git-branch/"&gt;git branch&lt;/a&gt;&lt;/p&gt;</description></item><item><title>manage-docker-as-non-root-user</title><link>https://blog.ulutasalperen.com/docs/docker/manage-docker-as-non-root-user/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/manage-docker-as-non-root-user/</guid><description>&lt;h2 id="manage-docker-as-a-non-root-user"&gt;&lt;a href="https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user"&gt;Manage Docker as a non-root user&lt;/a&gt;&lt;a class="anchor" href="#manage-docker-as-a-non-root-user"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The Docker daemon binds to a Unix socket, not a TCP port. By default it&amp;rsquo;s the &lt;code&gt;root&lt;/code&gt; user that owns the Unix socket, and other users can only access it using &lt;code&gt;sudo&lt;/code&gt;. The Docker daemon always runs as the &lt;code&gt;root&lt;/code&gt; user.&lt;/p&gt;&#10;&lt;p&gt;If you don&amp;rsquo;t want to preface the &lt;code&gt;docker&lt;/code&gt; command with &lt;code&gt;sudo&lt;/code&gt;, create a Unix group called &lt;code&gt;docker&lt;/code&gt; and add users to it. When the Docker daemon starts, it creates a Unix socket accessible by members of the &lt;code&gt;docker&lt;/code&gt; group. On some Linux distributions, the system automatically creates this group when installing Docker Engine using a package manager. In that case, there is no need for you to manually create the group.&lt;/p&gt;</description></item><item><title>docker-containers-images</title><link>https://blog.ulutasalperen.com/docs/docker/docker-containers-images/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/docker-containers-images/</guid><description>&lt;h1 id="containers"&gt;Containers&lt;a class="anchor" href="#containers"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;blockquote class='book-hint '&gt;&#10;&lt;p&gt;A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another.&lt;/p&gt;&#10;&lt;p&gt;&amp;ndash; &lt;a href="https://www.docker.com/resources/what-container/"&gt;Docker&lt;/a&gt;&lt;/p&gt;&#10;&lt;/blockquote&gt;&lt;p&gt;Containers, on the other hand, gives us 90% of the benefits of virtual machines, but are &lt;em&gt;super&lt;/em&gt; lightweight. &lt;em&gt;Containers boot up in seconds, while virtual machines can take minutes.&lt;/em&gt;&lt;/p&gt;&#10;&lt;h2 id="virtual-machine-architecture"&gt;Virtual Machine Architecture&lt;a class="anchor" href="#virtual-machine-architecture"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;img src="https://storage.googleapis.com/qvault-webapp-dynamic-assets/course_assets/QS4HGNG.png" alt="" /&gt;&lt;/p&gt;&#10;&lt;h2 id="container-docker-architectures"&gt;Container (Docker) Architectures&lt;a class="anchor" href="#container-docker-architectures"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;img src="https://storage.googleapis.com/qvault-webapp-dynamic-assets/course_assets/fmZG1Zd-662x400.png" alt="" /&gt;&lt;/p&gt;</description></item><item><title>github_workflow</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/github_workflow/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/github_workflow/</guid><description>&lt;p&gt;001 - &lt;a href="continuous_integration/"&gt;continuous_integration&lt;/a&gt;&#10;002 - &lt;a href="continuous_deployment/"&gt;continuous_deployment&lt;/a&gt;&lt;/p&gt;&#10;&lt;h1 id="hugo-book-teması-ve-github-actionsworkflow-ile-vpse-cd"&gt;Hugo-Book Teması ve GitHub Actions(workflow) ile VPS&amp;rsquo;e CD&lt;a class="anchor" href="#hugo-book-temas%c4%b1-ve-github-actionsworkflow-ile-vpse-cd"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Hugo,Markdown dosyalarını statik bir siteye dönüştüren bir araç. Bu yazıda, suan bulundugunuz siteyi nasil &lt;em&gt;hugo-book&lt;/em&gt; temasını kullanırken aynı zamanda GitHub Workflow kullanarak her değişikliği debian tabanli uzak sunucuma nasıl otomatik olarak deploy edeceğimi anlatmak istedim.&lt;/p&gt;&#10;&lt;h2 id="1-vps-ve-kullanıcı-yapılandırması"&gt;1. VPS ve Kullanıcı Yapılandırması&lt;a class="anchor" href="#1-vps-ve-kullan%c4%b1c%c4%b1-yap%c4%b1land%c4%b1rmas%c4%b1"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;İlk başta sistemi &lt;code&gt;--system&lt;/code&gt; parametresiyle kurmayı düşünmüştüm. Sistem kullanıcısı oluşturmak mantıklı çünkü bu kullanıcının varsayılan olarak bir şifresi ve interaktif bir shell oturumu olmaz (tabi belirli komutlarla yapilabilir). Bu da sunucunun guvenligini arttirir.&lt;/p&gt;</description></item><item><title>continuous_integration</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/continuous_integration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/continuous_integration/</guid><description>&lt;h1 id="continuous-integration"&gt;Continuous Integration&lt;a class="anchor" href="#continuous-integration"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Continuous Integration (CI) is where developers regularly push code changes into a central repository, and by doing so, automated builds and tests are automatically run.&lt;/p&gt;&#10;&lt;p&gt;Those tests can include unit tests, integration tests, styling checks, linting checks, security checks or any other type of automated test. If &lt;em&gt;any&lt;/em&gt; of the tests fail, the build is considered &amp;ldquo;broken&amp;rdquo; and the developer is notified so they can fix it.&lt;/p&gt;&#10;&lt;h2 id="i-was-forked-bootdev-cli-for-testing-ci-at-bootdev-cli"&gt;I was forked boot.dev cli for testing CI at Boot.dev Cli&lt;a class="anchor" href="#i-was-forked-bootdev-cli-for-testing-ci-at-bootdev-cli"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Here at Boot.dev CI tests that run each time a new pull request is opened. The reviewer doesn&amp;rsquo;t need to manually check for formatting issues or run tests locally before approving the changes. It automates &lt;em&gt;part&lt;/em&gt; of the code review process.&lt;/p&gt;</description></item><item><title>docker-volumes</title><link>https://blog.ulutasalperen.com/docs/docker/docker-volumes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/docker-volumes/</guid><description>&lt;h1 id="volumes"&gt;Volumes&lt;a class="anchor" href="#volumes"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;By default, Docker containers don&amp;rsquo;t retain any state from &lt;em&gt;past&lt;/em&gt; containers. For example, if I:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Start a container from an image&lt;/li&gt;&#10;&lt;li&gt;Make some changes to the filesystem (like installing a new package) in that container&lt;/li&gt;&#10;&lt;li&gt;Stop the container&lt;/li&gt;&#10;&lt;li&gt;Start a new container from the same image&lt;/li&gt;&#10;&lt;li&gt;The new container does &lt;em&gt;not&lt;/em&gt; have the changes I made in step 2.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;However, if I restart the &lt;em&gt;stopped&lt;/em&gt; container, it &lt;em&gt;will&lt;/em&gt; have the changes I made. This is only worth mentioning because sometimes developers think that killing an old container and starting a new one is the same as &lt;em&gt;restarting a process&lt;/em&gt; - but that&amp;rsquo;s not true&amp;hellip; it&amp;rsquo;s more like resetting the state of the &lt;em&gt;entire machine&lt;/em&gt; to the original image.&lt;/p&gt;</description></item><item><title>continuous_deployment</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/continuous_deployment/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/continuous_deployment/</guid><description>&lt;p&gt;Continuous Deployment (CD) is the process of automatically deploying code changes to a production environment after the code has been built and tested. Let&amp;rsquo;s set up CD for Notely!&lt;/p&gt;&#10;&lt;p&gt;We&amp;rsquo;ll be using GitHub Actions again, but we&amp;rsquo;ll create a new workflow for CD: &lt;code&gt;cd.yml&lt;/code&gt;&lt;/p&gt;&#10;&lt;h2 id="how-to-create-cd"&gt;How to create cd&lt;a class="anchor" href="#how-to-create-cd"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Create a new workflow &lt;code&gt;.github/workflows/cd.yml&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;It should trigger on &lt;code&gt;push&lt;/code&gt; into the &lt;code&gt;main&lt;/code&gt; branch.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-yaml" data-lang="yaml"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;on&lt;/span&gt;:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;push&lt;/span&gt;:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;branches&lt;/span&gt;: [&lt;span style="color:#ae81ff"&gt;main]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="3"&gt;&#10;&lt;li&gt;It should have a single job called &lt;code&gt;Deploy&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;It should checkout the code&lt;/li&gt;&#10;&lt;li&gt;It should set up the Go toolchain&lt;/li&gt;&#10;&lt;li&gt;It should build the app using the &lt;code&gt;scripts/buildprod.sh&lt;/code&gt; script&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;To be clear, the &lt;code&gt;ci&lt;/code&gt; workflow runs when a pull request is &lt;em&gt;opened&lt;/em&gt;, but the &lt;code&gt;cd&lt;/code&gt; workflow runs when a pull request is &lt;em&gt;merged&lt;/em&gt; (or when code is pushed directly to the &lt;code&gt;main&lt;/code&gt; branch).&lt;/p&gt;</description></item><item><title>docker-build</title><link>https://blog.ulutasalperen.com/docs/docker/docker-build/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/docker-build/</guid><description>&lt;h1 id="dockerfiles"&gt;Dockerfiles&lt;a class="anchor" href="#dockerfiles"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Docker isn&amp;rsquo;t &lt;em&gt;only&lt;/em&gt; useful for running &lt;em&gt;other&lt;/em&gt; people&amp;rsquo;s software (as we&amp;rsquo;ve been doing so far). It&amp;rsquo;s also a great way to build and package our own software.&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://blog.ulutasalperen.com/images/docker/container-image-composition.png" alt="Container image composition" /&gt;&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;ve used Docker both ways. As a DevOps/platform engineer I&amp;rsquo;m usually using other&amp;rsquo;s images, but as a backend developer I was usually building images for our own servers.&lt;/p&gt;&#10;&lt;p&gt;Docker images are built from &lt;em&gt;Dockerfiles&lt;/em&gt;. A Dockerfile is just a text file that contains all the commands needed to assemble an image. It&amp;rsquo;s essentially the &lt;a href="https://en.wikipedia.org/wiki/Infrastructure_as_Code"&gt;&amp;ldquo;Infrastructure as Code&amp;rdquo;&lt;/a&gt; (IaC) for an image. It runs commands from top to bottom, kind of like a shell script.&lt;/p&gt;</description></item><item><title>optimize-container-images-with-multi-stage-builds</title><link>https://blog.ulutasalperen.com/docs/docker/optimize-container-images-with-multi-stage-builds/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/optimize-container-images-with-multi-stage-builds/</guid><description>&lt;h2 id="the-problem-with-single-stage-builds"&gt;The problem with single-stage builds&lt;a class="anchor" href="#the-problem-with-single-stage-builds"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;When you use the &lt;code&gt;golang&lt;/code&gt; image to compile &lt;em&gt;and&lt;/em&gt; run a Go application in the same stage, the final image inherits the entire Go compiler toolchain - over 800MB of packages and hundreds of CVEs that you don&amp;rsquo;t need at runtime.&lt;/p&gt;&#10;&lt;blockquote class='book-hint '&gt;&#10;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Single-stage Go builds keep the full compiler toolchain (~800MB+) in the final image even though only the compiled binary is needed at runtime.&lt;/p&gt;</description></item><item><title>docker-network</title><link>https://blog.ulutasalperen.com/docs/docker/docker-network/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/docker-network/</guid><description>&lt;h1 id="docker-network"&gt;Docker-Network&lt;a class="anchor" href="#docker-network"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;h2 id="offline"&gt;Offline&lt;a class="anchor" href="#offline"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Now, let&amp;rsquo;s force a container into &lt;em&gt;offline&lt;/em&gt; mode!&lt;/p&gt;&#10;&lt;p&gt;You might be thinking, &amp;ldquo;why would I want to turn off networking?!?&amp;rdquo; Well, usually it&amp;rsquo;s for security reasons. You might want to remove the network connection from a container in one of these scenarios:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;You&amp;rsquo;re running 3rd party code that you don&amp;rsquo;t trust, and it shouldn&amp;rsquo;t need network access&lt;/li&gt;&#10;&lt;li&gt;You&amp;rsquo;re building an e-learning site, and you&amp;rsquo;re allowing students to execute code on your machines&lt;/li&gt;&#10;&lt;li&gt;You know a container has a virus that&amp;rsquo;s sending malicious requests over the internet, and you want to do an audit&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="network-none"&gt;Network None&lt;a class="anchor" href="#network-none"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;The &lt;code&gt;docker run&lt;/code&gt; command has a &lt;code&gt;--network none&lt;/code&gt; flag that makes it so that the container can&amp;rsquo;t network with the outside world, which is super useful for isolating containers.&lt;/p&gt;</description></item><item><title>docker-exec-shell</title><link>https://blog.ulutasalperen.com/docs/docker/docker-exec-shell/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/docker-exec-shell/</guid><description>&lt;h1 id="exec"&gt;Exec&lt;a class="anchor" href="#exec"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;When it comes to &lt;em&gt;deploying&lt;/em&gt; applications with Docker, you&amp;rsquo;ll usually just let the container do its thing. For example, the Ghost container we ran in the last chapter started up its own web server (based on the image configuration). We didn&amp;rsquo;t need to run any manual commands in addition to just starting the container.&lt;/p&gt;&#10;&lt;p&gt;That said, it &lt;em&gt;is&lt;/em&gt; possible to run commands inside a running container! It&amp;rsquo;s kinda like the container version of &lt;a href="https://www.ssh.com/ssh/"&gt;ssh&lt;/a&gt;ing into a remote server and running a command.&lt;/p&gt;</description></item><item><title>docker-logs</title><link>https://blog.ulutasalperen.com/docs/docker/docker-logs/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/docker-logs/</guid><description>&lt;h1 id="docker-logs"&gt;Docker Logs&lt;a class="anchor" href="#docker-logs"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;When containers are running in detached mode with the &lt;code&gt;-d&lt;/code&gt; flag, you don&amp;rsquo;t see any output in your terminal, which is nice for keeping your terminal clean, but what if something goes &lt;em&gt;wrong&lt;/em&gt;?&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;Enter the &lt;code&gt;docker logs&lt;/code&gt; command&lt;/em&gt;.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker logs &lt;span style="color:#f92672"&gt;[&lt;/span&gt;OPTIONS&lt;span style="color:#f92672"&gt;]&lt;/span&gt; CONTAINER&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="ornek-log"&gt;Ornek log&lt;a class="anchor" href="#ornek-log"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Let&amp;rsquo;s run the Linux &lt;code&gt;alpine&lt;/code&gt; image in a new container in detached mode, and give it a simple command to run to generate some standard output:&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker run -d --name logdate alpine sh -c &lt;span style="color:#e6db74"&gt;&amp;#39;while true; do echo &amp;#34;LOGGING: $(date)&amp;#34;; sleep 1; done&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;sh -c 'while true; do echo &amp;quot;LOGGING: $(date)&amp;quot;; sleep 1; done'&lt;/code&gt; part is just a simple shell script to execute inside the container that prints the current date and time every second.&lt;/p&gt;</description></item><item><title>docker-compose-basic</title><link>https://blog.ulutasalperen.com/docs/docker/docker-compose-basic/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/docker-compose-basic/</guid><description>&lt;p&gt;docker compose ne isimize yariyor dersek, birden fazla konteyneri tek bir yaml dosyasindan yonetmemize yariyor, tek tek docker run ile ugrasmiyoruz ve ayni zamanda restart sayesinde sistem acilinca uygulamayi otomatik ayakta tutabiliyoruz&lt;/p&gt;&#10;&lt;h3 id="temel-calisma-mantigi"&gt;temel calisma mantigi&lt;a class="anchor" href="#temel-calisma-mantigi"&gt;#&lt;/a&gt;&lt;/h3&gt;&#10;&lt;p&gt;proje klasorunde docker-compose.yml diye bir dosya aciyoruz, icine servisleri, networkleri ve volumeleri yazip sonra compose bunlari otomatik kurup birbirine bagliyor ve dayyum! uygulamalar ayakta oluyor, istegimize gore state&amp;rsquo;ini ayarlayabiliyoruz&lt;/p&gt;&#10;&lt;h3 id="ornek-1---tier1-docker-composeyml"&gt;ornek 1 - tier1 (docker-compose.yml)&lt;a class="anchor" href="#ornek-1---tier1-docker-composeyml"&gt;#&lt;/a&gt;&lt;/h3&gt;&#10;&lt;p&gt;asagidaki ornekte bir nginx web sunucusu ve bir postgres veritabani var, en cok kullandigimiz temel seyler icinde.&lt;/p&gt;</description></item><item><title>git status</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-status/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-status/</guid><description>&lt;h1 id="status"&gt;Status&lt;a class="anchor" href="#status"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;A file can be in one of &lt;a href="https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_the_very_basics"&gt;several states&lt;/a&gt; in a Git repository. Here are a few important ones:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code&gt;untracked&lt;/code&gt;: Not being tracked by Git&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;staged&lt;/code&gt;: Marked for inclusion in the next commit&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;committed&lt;/code&gt;: Saved to the repository&amp;rsquo;s history&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The &lt;code&gt;git status&lt;/code&gt; command shows you the current state of your repo. It will tell you which files are untracked, staged, and committed.&lt;/p&gt;&#10;&lt;p&gt;for more &lt;a href="git-branch/"&gt;git branch&lt;/a&gt;&lt;/p&gt;</description></item><item><title>git add</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-add/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-add/</guid><description>&lt;h1 id="git-add"&gt;git add&lt;a class="anchor" href="#git-add"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Here&amp;rsquo;s the command:&lt;/p&gt;&#10;&lt;p&gt;&lt;code&gt;git add &amp;lt;path-to-file | pattern&amp;gt;&lt;/code&gt;&lt;/p&gt;&#10;&lt;p&gt;For example:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git add i-use-arch.btw&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>var-olan-volume-uzerine-docker-compose</title><link>https://blog.ulutasalperen.com/docs/docker/var-olan-volume-uzerine-docker-compose/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/var-olan-volume-uzerine-docker-compose/</guid><description>&lt;h1 id="ilk-olarak-ben-örnek-olarak-vereceğim"&gt;İlk olarak ben örnek olarak vereceğim&lt;a class="anchor" href="#ilk-olarak-ben-%c3%b6rnek-olarak-verece%c4%9fim"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;h2 id="kullanmak-istediğim-uygulama-filebrowser-kurulum-yaparken-admin-kullanıcının-yanında-rastgele-encrypted-şifre-oluşturuyor-arka-planda-calisirken-ve-docker-logs-da-baktigimdada-parolayi-goruntuleyemedigimden-boyle-bir-yol-izledim"&gt;kullanmak istediğim uygulama (filebrowser) kurulum yaparken admin kullanıcının yanında rastgele encrypted şifre oluşturuyor arka planda calisirken ve &lt;code&gt;docker logs&lt;/code&gt; da baktigimdada parolayi goruntuleyemedigimden boyle bir yol izledim&lt;a class="anchor" href="#kullanmak-istedi%c4%9fim-uygulama-filebrowser-kurulum-yaparken-admin-kullan%c4%b1c%c4%b1n%c4%b1n-yan%c4%b1nda-rastgele-encrypted-%c5%9fifre-olu%c5%9fturuyor-arka-planda-calisirken-ve-docker-logs-da-baktigimdada-parolayi-goruntuleyemedigimden-boyle-bir-yol-izledim"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker compose up -d &lt;span style="color:#75715e"&gt;# -d flag arka planda çalıştır demek&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote class='book-hint '&gt;&#10;&lt;p&gt;böyle yaptığımdan arka planda çalıştigindan parolayi olusturdu ama cikti olarak vermedi onuda olusturdugu persistent volume yazdi ama ben görmedim&lt;/p&gt;&#10;&lt;/blockquote&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker compose up&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote class='book-hint '&gt;&#10;&lt;p&gt;bana şifreyi verecekti ama çoktan iş işten geçti :D şifreyi de hash&amp;rsquo;li olarak sakladığından dosyalara girsem bile fayda vermeyecekti&lt;/p&gt;</description></item><item><title>docker-publish</title><link>https://blog.ulutasalperen.com/docs/docker/docker-publish/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/docker-publish/</guid><description>&lt;h1 id="publishing-to-docker-hub"&gt;Publishing to Docker Hub&lt;a class="anchor" href="#publishing-to-docker-hub"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Let&amp;rsquo;s publish the Go server we Dockerized up to Docker Hub.&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Rebuild the Go binary:&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GOOS&lt;span style="color:#f92672"&gt;=&lt;/span&gt;linux GOARCH&lt;span style="color:#f92672"&gt;=&lt;/span&gt;amd64 go build&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="2"&gt;&#10;&lt;li&gt;Rebuild the image. You&amp;rsquo;ll need to use a name that corresponds to &lt;em&gt;your&lt;/em&gt; namespace on Docker Hub. Swap out &lt;code&gt;USERNAME&lt;/code&gt; for &lt;em&gt;your&lt;/em&gt; Docker Hub username.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker build . -t USERNAME/goserver&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="3"&gt;&#10;&lt;li&gt;Run your image in a container to make sure it still works:&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker run -p 8991:8991 USERNAME/goserver&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start="4"&gt;&#10;&lt;li&gt;Push the image to Docker Hub:&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker push USERNAME/goserver&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h1 id="delete-and-pull"&gt;Delete and Pull&lt;a class="anchor" href="#delete-and-pull"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Let&amp;rsquo;s delete our local copy of the image, then pull it back down from Docker Hub. Just like with GitHub, the nice thing about having images in the cloud is that if something happens to your computer, or you&amp;rsquo;re working on another machine, you can always pull down your images.&lt;/p&gt;</description></item><item><title>git commit</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-commit/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-commit/</guid><description>&lt;h1 id="commit"&gt;Commit&lt;a class="anchor" href="#commit"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;After staging a file, we can &lt;a href="https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/about-commits"&gt;commit&lt;/a&gt; it.&lt;/p&gt;&#10;&lt;p&gt;A commit is a snapshot of the repository at a given point in time. It&amp;rsquo;s a way to save the state of the repository, and it&amp;rsquo;s how Git keeps track of changes to the project. A commit comes with a message that describes the changes made in the commit.&lt;/p&gt;&#10;&lt;p&gt;Here&amp;rsquo;s how to &lt;a href="https://git-scm.com/docs/git-commit"&gt;commit&lt;/a&gt; all of your staged files:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git commit -m &lt;span style="color:#e6db74"&gt;&amp;#34;your message here&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id="change-the-last-commit-message"&gt;Change the last commit message&lt;a class="anchor" href="#change-the-last-commit-message"&gt;#&lt;/a&gt;&lt;/h4&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git commit --amend -m &lt;span style="color:#e6db74"&gt;&amp;#34;A: add contents.md&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description></item><item><title>docker-kurulum-hardening-rocky</title><link>https://blog.ulutasalperen.com/docs/docker/docker-kurulum-hardening-rocky/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/docker-kurulum-hardening-rocky/</guid><description>&lt;h3 id="rocky-linux-için-güvenli-docker-ve-docker-compose-kurulum-dokümantasyonu"&gt;Rocky Linux İçin Güvenli Docker ve Docker Compose Kurulum Dokümantasyonu&lt;a class="anchor" href="#rocky-linux-i%c3%a7in-g%c3%bcvenli-docker-ve-docker-compose-kurulum-dok%c3%bcmantasyonu"&gt;#&lt;/a&gt;&lt;/h3&gt;&#10;&lt;h4 id="1-sistem-hazırlığı-ve-bağımlılıklar"&gt;1. Sistem Hazırlığı ve Bağımlılıklar&lt;a class="anchor" href="#1-sistem-haz%c4%b1rl%c4%b1%c4%9f%c4%b1-ve-ba%c4%9f%c4%b1ml%c4%b1l%c4%b1klar"&gt;#&lt;/a&gt;&lt;/h4&gt;&#10;&lt;p&gt;Kuruluma başlamadan önce sistemin güncel olduğundan ve Docker deposunu yönetmemizi sağlayacak araçların yüklendiğinden emin oluyoruz.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo dnf update -y&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo dnf install -y dnf-plugins-core&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id="2-resmi-docker-deposunun-eklenmesi"&gt;2. Resmi Docker Deposunun Eklenmesi&lt;a class="anchor" href="#2-resmi-docker-deposunun-eklenmesi"&gt;#&lt;/a&gt;&lt;/h4&gt;&#10;&lt;p&gt;Docker, Rocky için ayrı bir depo yayınlamıyor; RHEL türevleri için tek bir depo tutuyor ve bu depo &lt;strong&gt;CentOS&lt;/strong&gt; olarak adlandırılıyor. Rocky&amp;rsquo;de de bu depoyu kullanıyoruz:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;blockquote class='book-hint '&gt;&#10;&lt;p&gt;Rocky 10&amp;rsquo;da paket yöneticisi dnf5&amp;rsquo;e geçti; orada komut biraz farklı: &lt;code&gt;sudo dnf config-manager addrepo --from-repofile=https://download.docker.com/linux/centos/docker-ce.repo&lt;/code&gt;. Rocky 9&amp;rsquo;da (dnf4) yukarıdaki komut olduğu gibi çalışır.&lt;/p&gt;</description></item><item><title>git push</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-push/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-push/</guid><description>&lt;h1 id="git-push"&gt;Git Push&lt;a class="anchor" href="#git-push"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;The &lt;code&gt;git push&lt;/code&gt; command pushes (sends) local changes to any &amp;ldquo;remote&amp;rdquo; - in our case, GitHub. For example, to push our local &lt;code&gt;main&lt;/code&gt; branch&amp;rsquo;s commits to the remote &lt;code&gt;origin&lt;/code&gt;&amp;rsquo;s &lt;code&gt;main&lt;/code&gt; branch we would run:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git push origin main&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;You need to be authenticated with the remote to push changes, which you should have done in the last lesson.&lt;/em&gt;&lt;/p&gt;&#10;&lt;h2 id="alternative-options"&gt;Alternative Options&lt;a class="anchor" href="#alternative-options"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;You can also push a local branch to a remote with a &lt;em&gt;different&lt;/em&gt; name:&lt;/p&gt;</description></item><item><title>docker-distroless-container-images</title><link>https://blog.ulutasalperen.com/docs/docker/docker-distroless-container-images/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/docker/docker-distroless-container-images/</guid><description>&lt;h3 id="distroless-container-imageleri-içlerinde-ne-var-neden-kullanılır"&gt;Distroless Container Image&amp;rsquo;leri: İçlerinde Ne Var, Neden Kullanılır?&lt;a class="anchor" href="#distroless-container-imageleri-i%c3%a7lerinde-ne-var-neden-kullan%c4%b1l%c4%b1r"&gt;#&lt;/a&gt;&lt;/h3&gt;&#10;&lt;h4 id="1-distroless-nedir-neden-var"&gt;1. Distroless Nedir, Neden Var?&lt;a class="anchor" href="#1-distroless-nedir-neden-var"&gt;#&lt;/a&gt;&lt;/h4&gt;&#10;&lt;p&gt;&lt;code&gt;debian&lt;/code&gt;, &lt;code&gt;ubuntu&lt;/code&gt; veya türevlerinden (&lt;code&gt;node:lts&lt;/code&gt;, &lt;code&gt;python:3&lt;/code&gt; gibi) &lt;code&gt;FROM&lt;/code&gt; ile başlayan container image&amp;rsquo;leri, genellikle dolu dolu bir Linux dağıtımıyla birlikte gelir. Gündelik işler için harikadır ama çoğu container uygulaması çalışma zamanında bu araçların ve kütüphanelerin neredeyse hiçbirine ihtiyaç duymaz. Sonuç? Teknik bir gerekçe olmaksızın daha büyük image boyutu ve yönetmesi gereken daha fazla güvenlik açığı (CVE).&lt;/p&gt;&#10;&lt;p&gt;Küçük, güvenli image&amp;rsquo;ler üretme isteği gayet doğal. Bunun en ekstrem yolu &lt;code&gt;FROM scratch&lt;/code&gt; ile başlamaktır; yani boş bir base image&amp;rsquo;e sadece uygulamamızın gerçekten ihtiyaç duyduğu dosyaları eklemek. Ancak &lt;code&gt;FROM scratch&lt;/code&gt; ile başlayan container&amp;rsquo;lar varsayılan olarak şunları içermez:&lt;/p&gt;</description></item><item><title>git branch</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-branch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-branch/</guid><description>&lt;h1 id="what-is-a-branch"&gt;What Is a Branch?&lt;a class="anchor" href="#what-is-a-branch"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;A &lt;a href="https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell"&gt;Git branch&lt;/a&gt; allows you to keep track of different changes separately.&lt;/p&gt;&#10;&lt;p&gt;For example, let&amp;rsquo;s say you have a big web project and you want to experiment with changing the color scheme. Instead of changing the entire project directly (as of right now, our &lt;code&gt;master&lt;/code&gt; branch), you can create a new branch called &lt;code&gt;color_scheme&lt;/code&gt; and work on that branch. When you&amp;rsquo;re done, if you like the changes, you can &lt;a href="https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging"&gt;merge&lt;/a&gt; the &lt;code&gt;color_scheme&lt;/code&gt; branch back into the &lt;code&gt;master&lt;/code&gt; branch to keep the changes. If you don&amp;rsquo;t like the changes, you can simply delete the &lt;code&gt;color_scheme&lt;/code&gt; branch and go back to the &lt;code&gt;master&lt;/code&gt; branch.&lt;/p&gt;</description></item><item><title>git pull</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-pull/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-pull/</guid><description>&lt;h1 id="pull"&gt;Pull&lt;a class="anchor" href="#pull"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Fetching is nice, but most of the time we want the &lt;em&gt;actual file changes&lt;/em&gt; from a remote repo, not just the metadata.&lt;/p&gt;&#10;&lt;h2 id="command-syntax"&gt;Command Syntax&lt;a class="anchor" href="#command-syntax"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;&lt;code&gt;git pull [&amp;lt;remote&amp;gt;/&amp;lt;branch&amp;gt;]&lt;/code&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;The &lt;code&gt;[...]&lt;/code&gt; syntax means that the bracketed remote and branch are optional. If you execute git pull without anything specified it will pull your current branch from the remote repo&lt;/em&gt;.&lt;/p&gt;&#10;&lt;p&gt;&lt;img src="https://storage.googleapis.com/qvault-webapp-dynamic-assets/course_assets/gmj5WB9.png" alt="git pull origin main" /&gt;&lt;/p&gt;</description></item><item><title>git log</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-log/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-log/</guid><description>&lt;h1 id="git-log"&gt;Git Log&lt;a class="anchor" href="#git-log"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;A Git repo is a (potentially very long) list of commits, where each commit represents the &lt;em&gt;full state of the repository&lt;/em&gt; at a given point in time.&lt;/p&gt;&#10;&lt;p&gt;The &lt;a href="https://git-scm.com/docs/git-log"&gt;git log&lt;/a&gt; command shows a history of the commits in a repository. This is what makes Git a version control system. You can see:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Who made a commit&lt;/li&gt;&#10;&lt;li&gt;When the commit was made&lt;/li&gt;&#10;&lt;li&gt;What was changed&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="a-commit-hash"&gt;A Commit Hash&lt;a class="anchor" href="#a-commit-hash"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Each commit has a unique identifier called a &amp;ldquo;commit hash&amp;rdquo;. This is a long string of characters that uniquely identifies the commit. Here&amp;rsquo;s an example of mine:&lt;/p&gt;</description></item><item><title>git merge</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-merge/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-merge/</guid><description>&lt;h1 id="merge"&gt;Merge&lt;a class="anchor" href="#merge"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;&amp;ldquo;What&amp;rsquo;s the point of having multiple branches?&amp;rdquo; you might ask. They&amp;rsquo;re most often used to safely make changes without affecting your (or your &lt;em&gt;team&amp;rsquo;s&lt;/em&gt;) primary branch. However, once you&amp;rsquo;re happy with your changes, you&amp;rsquo;ll want to &lt;a href="https://git-scm.com/docs/git-merge"&gt;merge&lt;/a&gt; them back into the main branch so that they make their way into the final product.&lt;/p&gt;&#10;&lt;h2 id="visual"&gt;Visual&lt;a class="anchor" href="#visual"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Let&amp;rsquo;s say you&amp;rsquo;re in a state where you have two branches, each with their own unique commits:&lt;/p&gt;</description></item><item><title>git rebase</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-rebase/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-rebase/</guid><description>&lt;h1 id="rebase"&gt;Rebase&lt;a class="anchor" href="#rebase"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;&amp;ldquo;&lt;a href="https://git-scm.com/docs/git-rebase"&gt;Rebase&lt;/a&gt; vs &lt;a href="https://git-scm.com/docs/git-merge"&gt;Merge&lt;/a&gt;&amp;rdquo; is one of the most hotly debated topics in the Git world. A lot of the discussions you&amp;rsquo;ll see online come down to the fact that many developers (yes, even professionals) don&amp;rsquo;t understand the purpose of rebase and use it incorrectly, causing a bunch of Git havoc, and then blame the rebase command.&lt;/p&gt;&#10;&lt;p&gt;&lt;em&gt;It&amp;rsquo;s not Git&amp;rsquo;s fault, it&amp;rsquo;s a skill issue.&lt;/em&gt;&lt;/p&gt;&#10;&lt;h2 id="visualizing-rebase"&gt;Visualizing Rebase&lt;a class="anchor" href="#visualizing-rebase"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Say we have this commit history:&lt;/p&gt;</description></item><item><title>git reset</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-reset/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-reset/</guid><description>&lt;h1 id="git-reset-soft"&gt;Git Reset Soft&lt;a class="anchor" href="#git-reset-soft"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;The &lt;a href="https://git-scm.com/docs/git-reset"&gt;git reset&lt;/a&gt; command can be used to undo the last commit(s) or any changes in the index (staged but not committed changes) and the worktree (unstaged and not committed changes).&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git reset --soft COMMITHASH&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;code&gt;--soft&lt;/code&gt; option is useful if you just want to go back to a previous commit, but keep all of your changes. Committed changes will be uncommitted and staged, while uncommitted changes will remain staged or unstaged as before.&lt;/p&gt;</description></item><item><title>git remote</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-remote/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-remote/</guid><description>&lt;h1 id="git-remote"&gt;Git Remote&lt;a class="anchor" href="#git-remote"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Often our frenemies (read: coworkers) make code changes that we need to begrudgingly accept into our pristine bug-free repos. &lt;em&gt;/s&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;This is where the &amp;ldquo;distributed&amp;rdquo; in &amp;ldquo;distributed version control system&amp;rdquo; comes from. We can have &amp;ldquo;remotes&amp;rdquo;, which are just external repos with &lt;em&gt;mostly&lt;/em&gt; the same Git history as our local repo.&lt;/p&gt;&#10;&lt;p&gt;When it comes to Git (the CLI tool), there really isn&amp;rsquo;t a &amp;ldquo;central&amp;rdquo; repo. GitHub is just someone else&amp;rsquo;s repo. Only by convention and convenience have we, as developers, started to use GitHub as a &amp;ldquo;source of truth&amp;rdquo; for our code.&lt;/p&gt;</description></item><item><title>git fetch</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-fetch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-fetch/</guid><description>&lt;h1 id="fetch"&gt;Fetch&lt;a class="anchor" href="#fetch"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;Adding a remote to our Git repo does &lt;em&gt;not&lt;/em&gt; mean that we automagically have all the contents of the remote. First, we need to &lt;a href="https://git-scm.com/docs/git-fetch"&gt;fetch&lt;/a&gt; the contents (but not yet!).&lt;/p&gt;&#10;&lt;h2 id="command"&gt;Command&lt;a class="anchor" href="#command"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git fetch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This downloads copies of all the contents of the &lt;code&gt;.git/objects&lt;/code&gt; directory (and other book-keeping information) from the remote repository into your current one.&lt;/p&gt;</description></item><item><title>git switch</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-switch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-switch/</guid><description>&lt;h1 id="new-branch"&gt;New Branch&lt;a class="anchor" href="#new-branch"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;You should already be on the &lt;code&gt;main&lt;/code&gt; branch: your &amp;ldquo;default&amp;rdquo; branch. You can always check with &lt;code&gt;git branch&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h2 id="two-ways-to-create-a-branch"&gt;Two Ways to Create a Branch&lt;a class="anchor" href="#two-ways-to-create-a-branch"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git branch my_new_branch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This creates a new branch called &lt;code&gt;my_new_branch&lt;/code&gt;. The thing is, I rarely use this command because usually I want to create a branch and switch to it immediately. So I use this command instead:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;git switch -c my_new_branch&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The &lt;a href="https://git-scm.com/docs/git-switch"&gt;switch&lt;/a&gt; command allows you to switch branches, and the &lt;code&gt;-c&lt;/code&gt; flag tells Git to create a new branch if it doesn&amp;rsquo;t already exist.&lt;/p&gt;</description></item><item><title>git config</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/git-config/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/git-config/</guid><description>&lt;p&gt;We need to configure Git to contain &lt;em&gt;your&lt;/em&gt; information. Whenever code changes, Git tracks &lt;em&gt;who&lt;/em&gt; made the change. To ensure you get proper credit (or more likely, blame) for all the code you write, you need to set your name and email.&lt;/p&gt;&#10;&lt;p&gt;Git comes with a &lt;a href="https://git-scm.com/docs/git-config"&gt;configuration&lt;/a&gt; both at the global and the repo (project) level. Most of the time, you&amp;rsquo;ll just use the global config.&lt;/p&gt;&#10;&lt;h2 id="assignment"&gt;Assignment&lt;a class="anchor" href="#assignment"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Let&amp;rsquo;s set your identity. Check if your &lt;code&gt;user.name&lt;/code&gt; and &lt;code&gt;user.email&lt;/code&gt; are already set:&lt;/p&gt;</description></item><item><title>gitignore</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/gitignore/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/gitignore/</guid><description>&lt;h1 id="gitignore"&gt;Gitignore&lt;a class="anchor" href="#gitignore"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;As you&amp;rsquo;ve seen, it&amp;rsquo;s &lt;em&gt;pretty normal&lt;/em&gt; to use the following workflow from the top level of your repo:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;code&gt;git add .&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;git commit -m &amp;quot;some message here&amp;quot;&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code&gt;git push origin main&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;A problem arises when we want to put files in our project&amp;rsquo;s directory, but we &lt;em&gt;don&amp;rsquo;t&lt;/em&gt; want to track them with Git. &lt;strong&gt;&lt;a href="gitignore/"&gt;gitignore&lt;/a&gt; file solves this.&lt;/strong&gt; For example, if you work with Python, you probably want to ignore automatically generated files like &lt;code&gt;.pyc&lt;/code&gt; and &lt;code&gt;__pycache__&lt;/code&gt;. If you are building a server, you probably want to ignore &lt;code&gt;.env&lt;/code&gt; files that might hold private keys. If you (I&amp;rsquo;m sorry) work with JavaScript, you might want to ignore the &lt;code&gt;node_modules&lt;/code&gt; directory.&lt;/p&gt;</description></item><item><title>plumping</title><link>https://blog.ulutasalperen.com/docs/version_control_systems/plumping/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://blog.ulutasalperen.com/docs/version_control_systems/plumping/</guid><description>&lt;h1 id="the-plumbing"&gt;The Plumbing&lt;a class="anchor" href="#the-plumbing"&gt;#&lt;/a&gt;&lt;/h1&gt;&#10;&lt;p&gt;So far we&amp;rsquo;ve been using Git in a &amp;ldquo;porcelain&amp;rdquo; manner. But to sate our insatiable curiosity, let&amp;rsquo;s take a look at some of the &amp;ldquo;plumbing&amp;rdquo;.&lt;/p&gt;&#10;&lt;h2 id="its-just-files-all-the-way-down"&gt;It&amp;rsquo;s Just Files All the Way Down&lt;a class="anchor" href="#its-just-files-all-the-way-down"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;All the data in a Git repository is stored directly in the (hidden) &lt;code&gt;.git&lt;/code&gt; directory. That includes all the commits, branches, tags, and other objects we&amp;rsquo;ll learn about later.&lt;/p&gt;&#10;&lt;p&gt;Git is made up of &lt;a href="https://git-scm.com/book/en/v2/Git-Internals-Git-Objects"&gt;objects&lt;/a&gt; that are stored in the &lt;code&gt;.git/objects&lt;/code&gt; directory. A commit is just a type of object.&lt;/p&gt;</description></item></channel></rss>