Hello DEV Community! ๐
I am a Senior .NET & C++ Architect with a deep interest in IoT networks and AI technologies. For the "New Year, New You Portfolio Challenge", I decided to refresh my online presence using a modern web stack and deploy it on Google Cloud Run to leverage its serverless container capabilities.
Here is the story of my journey from bare-metal memory management to mastering the container lifecycle.
๐ฏ The Motivation: Making the Invisible, Visible
As a backend architect, my career has been defined by things that are often invisible. Iโve spent years optimizing raw sockets, architecting IoT networks, and tuning low-level system performance. While this work is critical, it lacks a "visual" interface.
"I wanted to build a portfolio that wasn't just a static CV, but a living proof of concept that combines my core engineering valuesโspeed, control, and efficiencyโwith modern web technologies."
๐ The Result: Minimalist & Fast
Before diving into the code, here is the live result running on a serverless container.
(If the preview doesn't load, check it out here: Live Demo Link)
๐ ๏ธ The Stack: A C++ Developerโs Approach
When a system architect chooses a frontend stack, "hype" is irrelevant. Performance is everything. I chose a stack that mirrors the efficiency I strive for in C++.
-
โ๏ธ Frontend:
React 19&TypeScript- Chosen for type safety and modern UI patterns.
-
โก Build Tool:
esbuild- I deliberately chose esbuild over Webpack. Why? Because it's written in Go and compiles with near-native speed. As someone accustomed to C++ compilation times, waiting for JavaScript bundlers is painful.
esbuildbrings that raw speed back.
- I deliberately chose esbuild over Webpack. Why? Because it's written in Go and compiles with near-native speed. As someone accustomed to C++ compilation times, waiting for JavaScript bundlers is painful.
-
๐ฅ๏ธ Server:
serve- A lightweight static file serving handler for production.
-
โ๏ธ Infrastructure:
Docker&Google Cloud Run- The star of the show. It allows me to deploy stateless containers that scale to zero.
๐ The Challenge: The "Stdin" Trap
The most interesting part of this project wasn't the React code, but the Container Lifecycle.
During local development, I used esbuild --serve. It worked perfectly on my machine. However, when I deployed to Cloud Run, the container would crash immediately upon startup.
The Diagnosis ๐
Cloud Run environments are non-interactive. My dev-server command was listening to stdin (waiting for user input to exit), but in the serverless environment, the input stream is closed instantly. The process interpreted this as a signal to terminate.
The Fix ๐ ๏ธ
I had to re-architect the entry point:
- Separation: I separated the build process (
esbuild) from the runtime process. - Daemon Process: I switched to
servefor the production environment, which is designed to run as a daemon process rather than an interactive shell. - Dynamic Port: I mapped the container's
PORTenvironment variable dynamically to ensure the health check probes could reach the application.
This troubleshooting process reminded me that whether it's an IoT device or a Cloud container, understanding the runtime environment is paramount.
โ๏ธ Why Google Cloud Run?
For a personal portfolio, running a dedicated VM (EC2) is a waste of resources, and simple static hosting (GitHub Pages) lacks the backend flexibility I plan to add later.
Google Cloud Run was the sweet spot because:
- ๐ฆ Container-based: I could simply package my app with Docker, ensuring it runs exactly the same locally and in production.
- ๐ Scale to Zero: It incurs zero cost when no one is visiting the site, which is ideal for a personal portfolio.
- ๐ HTTPS Default: It provides a secure URL automatically without complex SSL configurations.
- ๐ฎ Future Proof: Itโs ready for the Python/AI backend services I plan to attach next.
๐ What's Next?
This portfolio is just the foundation. My roadmap involves integrating my expertise in AI:
- ๐ค RAG Agent Integration: I plan to embed a small LLM agent that can answer questions about my previous projects using RAG (Retrieval-Augmented Generation).
- ๐ Tech Blog: A section dedicated to deep dives into .NET architecture and Blazor Hybrid patterns.
Building this portfolio was a refreshing exercise in applying low-level optimization mindsets to high-level cloud infrastructure.
Happy Coding! ๐
๐ Links
- Live Portfolio: Visit Site
- GitHub Repository: hundong2
- LinkedIn: Donghun Lee
Top comments (0)