<?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>Forem: Abayomi</title>
    <description>The latest articles on Forem by Abayomi (@abayomi_e10e0d17185c18d1b).</description>
    <link>https://forem.com/abayomi_e10e0d17185c18d1b</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%2F3768891%2Fb9d55950-f220-485b-ac64-abf27272ff5b.png</url>
      <title>Forem: Abayomi</title>
      <link>https://forem.com/abayomi_e10e0d17185c18d1b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/abayomi_e10e0d17185c18d1b"/>
    <language>en</language>
    <item>
      <title>Building a Dockerized World News Application with FastAPI, PostgreSQL, and Nginx</title>
      <dc:creator>Abayomi</dc:creator>
      <pubDate>Sat, 14 Feb 2026 22:54:27 +0000</pubDate>
      <link>https://forem.com/abayomi_e10e0d17185c18d1b/building-a-dockerized-world-news-application-with-fastapi-postgresql-and-nginx-28hk</link>
      <guid>https://forem.com/abayomi_e10e0d17185c18d1b/building-a-dockerized-world-news-application-with-fastapi-postgresql-and-nginx-28hk</guid>
      <description>&lt;p&gt;Introduction&lt;/p&gt;

&lt;p&gt;In this article, I walk through building a full-stack world news application that fetches real-time headlines using a free external API. The project demonstrates containerization, backend development, frontend UI, database integration, and DevOps best practices.&lt;/p&gt;

&lt;p&gt;🧩 Project Architecture&lt;/p&gt;

&lt;p&gt;The system consists of four main components:&lt;/p&gt;

&lt;p&gt;Frontend (Nginx) – Displays news articles in a beautiful UI&lt;/p&gt;

&lt;p&gt;Backend (FastAPI) – Fetches news from NewsAPI and stores it in PostgreSQL&lt;/p&gt;

&lt;p&gt;Database (PostgreSQL) – Persists news articles&lt;/p&gt;

&lt;p&gt;External API (NewsAPI.org) – Provides real-world news data&lt;/p&gt;

&lt;p&gt;🐳 Containerization with Docker&lt;/p&gt;

&lt;p&gt;Each component runs in its own container, orchestrated using Docker Compose. This setup ensures portability, reproducibility, and clean separation of concerns.&lt;/p&gt;

&lt;p&gt;🔐 Managing Secrets with Environment Variables&lt;/p&gt;

&lt;p&gt;Sensitive data such as database credentials and API keys are stored in a .env file, keeping secrets out of the source code.&lt;/p&gt;

&lt;p&gt;🎨 Frontend Design&lt;/p&gt;

&lt;p&gt;The frontend is built using HTML, CSS, and JavaScript with a modern gradient UI and responsive news cards.&lt;/p&gt;

&lt;p&gt;🗄️ Backend and Database Integration&lt;/p&gt;

&lt;p&gt;FastAPI retrieves news articles and stores them in PostgreSQL using SQLAlchemy ORM. This design allows future features such as bookmarks and analytics.&lt;/p&gt;

&lt;p&gt;📦 Docker Networking and Volumes&lt;/p&gt;

&lt;p&gt;Docker bridge networking enables communication between containers, while named volumes ensure persistent PostgreSQL data storage.&lt;/p&gt;

&lt;p&gt;🚀 Conclusion&lt;/p&gt;

&lt;p&gt;This project demonstrates real-world DevOps and full-stack skills, including API integration, container orchestration, database persistence, and frontend development. It serves as a strong portfolio project for cloud and DevOps engineering roles.&lt;/p&gt;

&lt;p&gt;🔗 GitHub Repository&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/YomiHubHub/world-news-app.git" rel="noopener noreferrer"&gt;https://github.com/YomiHubHub/world-news-app.git&lt;/a&gt;&lt;/p&gt;

</description>
      <category>docker</category>
      <category>pstgres</category>
      <category>git</category>
      <category>fastapi</category>
    </item>
    <item>
      <title>Building a Fully Dockerized User Feedback Application with Flask and PostgreSQL</title>
      <dc:creator>Abayomi</dc:creator>
      <pubDate>Thu, 12 Feb 2026 13:20:11 +0000</pubDate>
      <link>https://forem.com/abayomi_e10e0d17185c18d1b/building-a-fully-dockerized-user-feedback-application-with-flask-and-postgresql-1732</link>
      <guid>https://forem.com/abayomi_e10e0d17185c18d1b/building-a-fully-dockerized-user-feedback-application-with-flask-and-postgresql-1732</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In this project, I built a full-stack web application using Docker to demonstrate containerization concepts including Dockerfiles, Docker Compose, volumes, networking, and environment variables.&lt;/p&gt;

&lt;p&gt;The application allows users to submit feedback through a web interface, which is stored in a PostgreSQL database running in a Docker container.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Project Architecture&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The system consists of three services:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Frontend (HTML/CSS/JS served via Nginx)&lt;/li&gt;
&lt;li&gt;Backend (Flask REST API)&lt;/li&gt;
&lt;li&gt;PostgreSQL Database&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All services run in isolated containers connected through a custom Docker network.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Dockerfile Explanation&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Backend Dockerfile
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Base image: &lt;code&gt;python:3.11-slim&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Installs Python dependencies&lt;/li&gt;
&lt;li&gt;Exposes port 5000&lt;/li&gt;
&lt;li&gt;Runs Flask app&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Frontend Dockerfile
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Base image: &lt;code&gt;nginx:alpine&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Copies static files into Nginx web directory&lt;/li&gt;
&lt;li&gt;Exposes port 80&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Docker Compose Orchestration&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Docker Compose was used to orchestrate multiple containers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PostgreSQL database&lt;/li&gt;
&lt;li&gt;Flask backend API&lt;/li&gt;
&lt;li&gt;Nginx frontend server&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Service dependencies were defined using &lt;code&gt;depends_on&lt;/code&gt;, and a custom Docker network enabled inter-container communication.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Volumes and Networking&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A Docker volume (&lt;code&gt;pgdata&lt;/code&gt;) was created to persist PostgreSQL data.&lt;br&gt;&lt;br&gt;
A custom network (&lt;code&gt;feedback-net&lt;/code&gt;) allows containers to communicate using service names instead of IP addresses.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Environment Variables&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Sensitive data such as database credentials were stored in a &lt;code&gt;.env&lt;/code&gt; file and injected into containers using Docker Compose.&lt;/p&gt;

&lt;p&gt;This avoids hardcoding secrets in the source code.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Challenges and Lessons Learned&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;One challenge was understanding the difference between Docker internal networking and browser networking. Docker service names work inside containers, but browsers must use &lt;code&gt;localhost&lt;/code&gt; when accessing exposed ports.&lt;/p&gt;

&lt;p&gt;Another lesson was ensuring database persistence using Docker volumes.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This project demonstrated real-world Docker usage, including multi-container orchestration, persistent storage, environment configuration, and networking. It highlights how Docker simplifies deploying full-stack applications.&lt;/p&gt;




&lt;p&gt;SYSTEM ARCHITECTURE DIAGRAM&lt;/p&gt;

&lt;p&gt;+--------------------+&lt;br&gt;
|      Browser       |&lt;br&gt;
+---------+----------+&lt;br&gt;
          |&lt;br&gt;
          v&lt;br&gt;
+--------------------+&lt;br&gt;
|  Frontend (Nginx)   |&lt;br&gt;
|  Container :8080    |&lt;br&gt;
+---------+----------+&lt;br&gt;
          |&lt;br&gt;
          v&lt;br&gt;
+--------------------+&lt;br&gt;
|  Backend (Flask)    |&lt;br&gt;
|  Container :5000    |&lt;br&gt;
+---------+----------+&lt;br&gt;
          |&lt;br&gt;
          v&lt;br&gt;
+--------------------+&lt;br&gt;
| PostgreSQL Database |&lt;br&gt;
| Docker Volume pgdata|&lt;br&gt;
+--------------------+&lt;/p&gt;

&lt;p&gt;you can access the full project in my github repo at;&lt;br&gt;
&lt;a href="https://github.com/YomiHubHub/user-feedback-docker.git" rel="noopener noreferrer"&gt;https://github.com/YomiHubHub/user-feedback-docker.git&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>devops</category>
      <category>learning</category>
      <category>api</category>
    </item>
  </channel>
</rss>
