<?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>Projects on Arve's Playground</title><link>https://www.arvesv.com/categories/projects/</link><description>Recent content in Projects on Arve's Playground</description><image><title>Arve's Playground</title><url>https://www.arvesv.com/apple-touch-icon.png</url><link>https://www.arvesv.com/apple-touch-icon.png</link></image><generator>Hugo</generator><language>en</language><copyright>2026 Arve Svendsen. All rights reserved.</copyright><lastBuildDate>Thu, 20 Aug 2026 11:05:26 +0200</lastBuildDate><atom:link href="https://www.arvesv.com/categories/projects/index.xml" rel="self" type="application/rss+xml"/><item><title>Where Should You Run Your Web Application? It Depends.</title><link>https://www.arvesv.com/posts/deploywebapp/</link><pubDate>Tue, 11 Nov 2025 00:00:00 +0000</pubDate><guid>https://www.arvesv.com/posts/deploywebapp/</guid><description>Exploring deployment options for a web app with a focus on cost, speed, and learning.</description><content:encoded><![CDATA[<p>I’ve built a web application—and thet need a home. What should I deploy it to? There are many platforms to choose from, I decided to turn the deployment decision into a mini project with three phases:</p>
<ol>
<li><strong>Design</strong> the ideal platform and deployment process</li>
<li><strong>Implement</strong> the design</li>
<li><strong>Learn</strong> from the experience</li>
</ol>
<p>I’m usually skeptical of too much upfront planning—real-world constraints tend to surprise you—but I’m giving it a shot.</p>
<hr>
<h2 id="-requirements">🧾 Requirements</h2>
<p>Here’s what I need from the platform:</p>
<ul>
<li>Must support a web server and a database</li>
<li>Must allow zero-downtime deployments</li>
<li>Must be internet-accessible with HTTPS</li>
<li>Occasional downtime for patching is acceptable</li>
<li>Downtime due to hardware failure is fine—recovery should be reasonable</li>
<li>Monthly operating cost should be <strong>≤ 6€</strong> (e.g., Hetzner’s cheapest VPS)</li>
<li>Fast deployment turnaround—code changes should go live quickly</li>
<li>Code is hosted on GitHub. Deoploys should be possible both from GitHub actions and the local developer machine</li>
<li>This is a <strong>learning project</strong>, optimized for fast iteration and feedback</li>
</ul>
<hr>
<h2 id="-design-choices">🧱 Design Choices</h2>
<h3 id="-containers">✅ Containers</h3>
<p>Containers offer consistent runtimes and portability. There is no reason to choose anything else.</p>
<h3 id="-scale-to-zero-container-runtimes">☁️ Scale-to-Zero Container Runtimes</h3>
<p>Platforms like <strong>Fly.io</strong>, <strong>Google Cloud Run</strong>, and <strong>Azure Container Apps</strong> let you run containers that can scale to zero when idle. They also handle updates, load balancing, and HTTPS certificates.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Easy deployment</li>
<li>Managed infrastructure</li>
<li>HTTPS out of the box</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Cold starts can be slow</li>
<li>Longer deployment turnaround</li>
<li>Higher cost if always running</li>
</ul>
<p>These platforms are excellent—but for this project, I think there’s a better alternative.</p>
<p><strong>Fly.io</strong> deserves a shoutout: it’s affordable and can build your container directly, eliminating the need for a separate registry.</p>
<hr>
<h2 id="databases-in-the-cloud">Databases in the Cloud?</h2>
<p>Hosting web apps in the cloud is cheap. Hosting databases? Not so much.</p>
<p>Managed databases come with replicas, backups, and high availability—and those features cost money. I don’t need them (yet).</p>
<p>Serverless databases exist, but startup latency is a concern.</p>
<hr>
<h2 id="-self-hosting-on-a-vps">🧑‍🔧 Self-Hosting on a VPS</h2>
<p>The downside of self-hosting? You manage everything.</p>
<p>The upside? A <strong>5€ Hetzner VPS</strong> (4GB RAM, 40GB SSD) or even my <strong>Intel N150 mini machine</strong> can host multiple apps and databases.</p>
<p>There are tools that help you manage web apps on your own infrastructure:</p>
<ul>
<li><a href="https://kamal-deploy.com">Kamal Deploy</a></li>
<li><a href="https://uncloud.run">Uncloud</a></li>
<li>Local Docker + custom scripts</li>
</ul>
<p>You learn a lot by manually setting up an reverse proxy and running containers yourself.</p>
<p><strong>Kamal Deploy</strong> works well, though complexity is growing as it adds features. I haven’t tried <strong>Uncloud</strong> yet, but it looks promising.</p>
<hr>
<h2 id="kubernetes">Kubernetes</h2>
<p>Given my requirements, I believe a small server where I install a one node &ldquo;mini&rdquo; Kubernetes is the best option. A machine with 4 GB of RAM can run <strong>microk8s</strong> or <strong>k3s</strong>, with enough power to host multiple apps and databases. I can run a local registry  can even run <strong>Valkey</strong> if needed.</p>
<ul>
<li>Kubernetes is made for running web apps with, it handles updates without downtime</li>
<li>I can run a databases, redis etc.</li>
<li>I will learn a lot of Kubernetes</li>
<li>With a local build/registry on the Kubernetes machine the turnaround time (for code change to live) will be way faster than any other container based deployment.</li>
</ul>
<p>It will be a lot of work, but a lot of learing. Is this the best option for you? It depends.</p>
<p>I hope to revist this in the future with some benchmark numbers, some experiences richer.</p>
]]></content:encoded></item></channel></rss>