<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Docker on nublog</title><link>https://nublog.pages.dev/tags/docker/</link><description>Recent content in Docker on nublog</description><generator>Hugo -- 0.160.0</generator><language>en-us</language><lastBuildDate>Sat, 28 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://nublog.pages.dev/tags/docker/index.xml" rel="self" type="application/rss+xml"/><item><title>From Docker Compose to Kubernetes: Modernizing My Spring Boot API</title><link>https://nublog.pages.dev/posts/my-fourth-post/</link><pubDate>Sat, 28 Feb 2026 00:00:00 +0000</pubDate><guid>https://nublog.pages.dev/posts/my-fourth-post/</guid><description>&lt;p&gt;In my previous post, I shared how I built Treso, a secure expense tracking REST API using Spring Boot, and deployed it using Docker and AWS EC2. While that setup worked great, managing containers with manual &lt;code&gt;docker run&lt;/code&gt; commands and custom networks isn&amp;rsquo;t how large-scale cloud applications operate today.&lt;/p&gt;
&lt;p&gt;To level up my infrastructure skills, I decided to migrate Treso to a fully Cloud-Native architecture using &lt;strong&gt;Kubernetes&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This post covers my journey from imperative container management to declarative orchestration.&lt;/p&gt;</description></item><item><title>Building a Cloud-Ready Expense Tracker: My Spring Boot, Docker &amp; AWS EC2 Journey</title><link>https://nublog.pages.dev/posts/my-third-post/</link><pubDate>Tue, 05 Aug 2025 00:00:00 +0000</pubDate><guid>https://nublog.pages.dev/posts/my-third-post/</guid><description>&lt;p&gt;I set out to build &lt;strong&gt;Treso&lt;/strong&gt;, a secure and modern expense tracking REST API.&lt;br&gt;
I wanted to go beyond simple CRUD apps and dive deep into &lt;em&gt;real-world&lt;/em&gt; backend engineering practices including secure authentication, containerization, and deploying to the cloud.&lt;/p&gt;
&lt;p&gt;This post is a summary of my key &lt;strong&gt;learnings&lt;/strong&gt; and insights not a step-by-step tutorial. If you’re curious about the code, &lt;a href="https://github.com/im-harshal/treso"&gt;check out my GitHub repo here&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="-why-this-project"&gt;💡 Why This Project?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Practice professional backend skills:&lt;/strong&gt; Not just code that “works,” but code that’s production-ready and maintainable.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Experiment with modern Spring Boot features:&lt;/strong&gt; Security, validation, OpenAPI docs, metrics.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Learn cloud deployment:&lt;/strong&gt; Run my app on AWS EC2 like real-world services.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Master Docker:&lt;/strong&gt; Build once, run anywhere, test with real databases.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="-learnings-from-spring-boot"&gt;🌱 Learnings from Spring Boot&lt;/h2&gt;
&lt;h3 id="1-secure-authentication-with-jwt"&gt;1. Secure Authentication with JWT&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Spring Security&lt;/strong&gt; isn’t just about “login” it’s a whole framework for role-based access, request filtering, and best practices.&lt;/li&gt;
&lt;li&gt;Implementing JWT taught me about:
&lt;ul&gt;
&lt;li&gt;Stateless session management&lt;/li&gt;
&lt;li&gt;Custom authentication filters&lt;/li&gt;
&lt;li&gt;Using &lt;code&gt;@ControllerAdvice&lt;/code&gt; for clean error responses&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="2-data-validation-and-exception-handling"&gt;2. Data Validation and Exception Handling&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Using &lt;strong&gt;Bean Validation&lt;/strong&gt; (&lt;code&gt;@Valid&lt;/code&gt;, &lt;code&gt;@NotNull&lt;/code&gt;, etc.) makes your API more robust and self-documenting.&lt;/li&gt;
&lt;li&gt;A single global exception handler gives clients clear, consistent error messages no more scattered try/catch blocks.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="3-building-for-scale-and-maintainability"&gt;3. Building for Scale and Maintainability&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;DTOs and service layers are worth it, even in a small app.&lt;/li&gt;
&lt;li&gt;Using &lt;strong&gt;JPA&lt;/strong&gt; with clear entity relationships (user ↔ expenses) made future feature expansion (analytics, sharing, etc.) much easier.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="-docker-development-and-deployment"&gt;🐳 Docker: Development and Deployment&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Multi-stage Dockerfiles&lt;/strong&gt; are a game changer: fast, clean images without leftover build tools.&lt;/li&gt;
&lt;li&gt;Environment variables (12-factor style) let me use the &lt;em&gt;same image&lt;/em&gt; everywhere from local dev to cloud.&lt;/li&gt;
&lt;li&gt;Running both the app and Postgres in containers (with Docker Compose) gave me confidence my code would “just work” anywhere.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Tip:&lt;/strong&gt; Debugging Docker networking taught me a lot about how containers talk to each other &lt;code&gt;localhost&lt;/code&gt; inside a container is &lt;em&gt;not&lt;/em&gt; the same as on your laptop!&lt;/p&gt;</description></item></channel></rss>