<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Postgres on SQP Dev</title>
    <link>/tags/postgres/</link>
    <description>Recent content in Postgres 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/postgres/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>Understanding Docker Volumes and PostgreSQL</title>
      <link>/posts/2026-05-10-understanding-docker-volumes-and-postgres/</link>
      <pubDate>Sun, 10 May 2026 00:00:00 +0000</pubDate>
      <guid>/posts/2026-05-10-understanding-docker-volumes-and-postgres/</guid>
      <description>&lt;h1 id=&#34;understanding-docker-volumes-and-postgresql&#34;&gt;Understanding Docker Volumes and PostgreSQL&lt;/h1&gt;&#xA;&lt;p&gt;One of the most confusing parts of my first deployment was PostgreSQL authentication failing even after changing the password in &lt;code&gt;.env&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The important lesson:&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;PostgreSQL only uses POSTGRES_PASSWORD the first time the database is created.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;what-happened&#34;&gt;What Happened&lt;/h2&gt;&#xA;&lt;p&gt;I originally started the database container with password A.&lt;/p&gt;&#xA;&lt;p&gt;Docker created a persistent volume:&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;dsu_pg_data&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Later I changed the password in &lt;code&gt;.env&lt;/code&gt; to password B.&lt;/p&gt;&#xA;&lt;p&gt;The application then failed with:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
