<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ec2 on SQP Dev</title>
    <link>/tags/ec2/</link>
    <description>Recent content in Ec2 on SQP Dev</description>
    <generator>Hugo</generator>
    <language>en-gb</language>
    <lastBuildDate>Sun, 10 May 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="/tags/ec2/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>First Real Cloud Deployment</title>
      <link>/posts/2026-05-10-first-real-cloud-deployment/</link>
      <pubDate>Sun, 10 May 2026 00:00:00 +0000</pubDate>
      <guid>/posts/2026-05-10-first-real-cloud-deployment/</guid>
      <description>&lt;h1 id=&#34;first-real-cloud-deployment&#34;&gt;First Real Cloud Deployment&lt;/h1&gt;&#xA;&lt;p&gt;Today I deployed my first real full-stack application to AWS EC2.&lt;/p&gt;&#xA;&lt;p&gt;The project is a hospital staff allocation system built with:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;React + Vite frontend&lt;/li&gt;&#xA;&lt;li&gt;Express backend&lt;/li&gt;&#xA;&lt;li&gt;PostgreSQL database&lt;/li&gt;&#xA;&lt;li&gt;Docker containers&lt;/li&gt;&#xA;&lt;li&gt;Docker Compose orchestration&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;what-i-learned&#34;&gt;What I Learned&lt;/h2&gt;&#xA;&lt;p&gt;The most important thing was understanding how the different layers connect together.&lt;/p&gt;&#xA;&lt;p&gt;Final architecture:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Browser&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   ↓ HTTPS&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;DuckDNS&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Caddy reverse proxy&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Docker app container&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;   ↓&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;PostgreSQL container&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;deployment-workflow&#34;&gt;Deployment Workflow&lt;/h2&gt;&#xA;&lt;p&gt;The workflow looked like this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Docker Basics — Building and Deploying to EC2</title>
      <link>/posts/2026-05-08-docker-basics-ec2/</link>
      <pubDate>Fri, 08 May 2026 00:00:00 +0000</pubDate>
      <guid>/posts/2026-05-08-docker-basics-ec2/</guid>
      <description>&lt;p&gt;Docker packages an application and everything it needs into a container. Same image, identical behaviour on any machine. This post covers building a custom nginx image and deploying it to AWS EC2.&lt;/p&gt;&#xA;&lt;h2 id=&#34;podman-on-fedora&#34;&gt;Podman on Fedora&lt;/h2&gt;&#xA;&lt;p&gt;Docker doesn&amp;rsquo;t run inside a Toolbox container — kernel module restrictions. Podman is Docker-compatible and works natively on Fedora:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;echo &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;alias docker=podman&amp;#39;&lt;/span&gt; &amp;gt;&amp;gt; ~/.bashrc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;source ~/.bashrc&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Same commands, no workarounds needed from this point.&lt;/p&gt;&#xA;&lt;h2 id=&#34;building-a-custom-image&#34;&gt;Building a Custom Image&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;docker-nginx/&#xA;├── Dockerfile&#xA;└── index.html&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-dockerfile&#34; data-lang=&#34;dockerfile&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt; docker.io/library/nginx:latest&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;COPY&lt;/span&gt; index.html /usr/share/nginx/html/&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;EXPOSE&lt;/span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt; 80&lt;/span&gt;&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker build -t my-nginx:v1.0 .&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run -d -p 8080:80 --name my-nginx my-nginx:v1.0&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Open &lt;code&gt;http://localhost:8080&lt;/code&gt; — custom HTML served via nginx inside a container.&lt;/p&gt;</description>
    </item>
    <item>
      <title>First Terraform Deployment on AWS</title>
      <link>/posts/2026-05-05-first-terraform-deployment/</link>
      <pubDate>Tue, 05 May 2026 00:00:00 +0000</pubDate>
      <guid>/posts/2026-05-05-first-terraform-deployment/</guid>
      <description>&lt;p&gt;With the environment set up, I wrote my first real Terraform code — a complete VPC with a public subnet, security group, and an EC2 instance running nginx.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-i-built&#34;&gt;What I Built&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;VPC (&lt;code&gt;10.0.0.0/16&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;li&gt;Public subnet with Internet Gateway&lt;/li&gt;&#xA;&lt;li&gt;Security group (SSH + HTTP)&lt;/li&gt;&#xA;&lt;li&gt;EC2 instance (Ubuntu 24.04)&lt;/li&gt;&#xA;&lt;li&gt;SSH key pair&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;file-structure&#34;&gt;File Structure&lt;/h2&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;exercise-02-variables-outputs/&#xA;├── main.tf&#xA;├── variables.tf&#xA;├── locals.tf&#xA;├── outputs.tf&#xA;├── data.tf&#xA;├── key.tf&#xA;└── terraform.tfvars&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Separating resources into logical files keeps things clean and readable.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
