From Localhost to the Internet: Deploying for $7/Month

The app was working. On my laptop. Which is the same as not working, for most purposes.

If the goal was to keep it to myself — test it occasionally, tinker with it, update the model when I felt like it — a working local copy would be enough. But that’s not what I built it for. The point of converting these models to web apps is that they can run anywhere, for anyone, without requiring someone to have Python installed and know how to use a terminal.

So: deployment.

deploy render localhost to live url

The Pieces

I’d heard of GitHub. Used it exactly once, years ago, for something I no longer remember. I had no active account, no configured Git on my current machine, and no particular fondness for command-line tools. I also had no budget for infrastructure.

The deployment path turned out to be: GitHub + Render. GitHub stores the code. Render runs it. When you push new code to GitHub, Render automatically pulls it and redeploys. The whole pipeline, once set up, costs $7 a month and requires no manual intervention after that.

Here’s how we got there.

Git, Configured

First, install Git if you don’t have it. Then tell it who you are:

git config --global user.name "kindoflost"
git config --global user.email "[email protected]"

This is just metadata — it attaches your name to commits. It doesn’t connect you to anything yet.

Then, in the project folder:

git init

This creates a hidden .git directory that Git will use to track changes. The project folder is now a local repository.

First Commit

git add .
git commit -m "Initial commit: staff scheduler app"

A commit is a named snapshot of your code at a point in time. The message is for you — it describes what changed. This first commit captures everything: the engine, the Flask app, the frontend, the requirements file.

At this point the code is saved locally in Git, but it hasn’t gone anywhere. It’s still only on the laptop.

GitHub

Create a GitHub account if you don’t have one. Create a new repository — I made it private, which is free. Call it whatever makes sense. Mine is staff-scheduler.

GitHub will give you a URL for the repository. Connect your local repo to it:

git remote add origin https://github.com/kindoflost/staff-scheduler.git
git branch -M main
git push -u origin main

The branch -M main step matters on older Git installations: Git used to default to a branch called master, but GitHub expects main. If you skip this, the push fails with a confusing error about “src refspec main does not match any.” Ask me how I know.

When you push, Git will ask how you want to authenticate. On Windows, browser authentication via Git Credential Manager is the simplest option. A browser window opens, you log into GitHub, and Git stores the credentials. No personal access tokens, no SSH keys, no configuration files.

Once the push succeeds, your code is on GitHub. You can see it in the browser. It still isn’t running anywhere — it’s just stored there.

Render

Render is a hosting platform. Create an account — you can sign up with GitHub OAuth, which means no separate password to manage. Create a new Web Service, connect it to the GitHub repository.

Render needs two things to run a Python app:

  • A build command: pip install -r requirements.txt
  • A start command: gunicorn app:app

The build command installs dependencies. The start command launches the production server. Gunicorn is a WSGI server — Flask’s built-in development server isn’t suitable for production use, so you use Gunicorn in front of it.

My first deploy failed. The error was a status 127 — command not found. Gunicorn wasn’t installed because it wasn’t in requirements.txt. I’d installed it locally at some point but hadn’t added it to the file. The fix was one line in requirements.txt, another commit, another push. Render saw the new commit and redeployed automatically. That automatic redeployment is the value: change code on your laptop, push to GitHub, app updates. No logging into servers, no manual steps.

What “Deploying for $7/Month” Actually Means

Render has a free tier. I chose the Starter plan at $7/month because the free tier has a significant limitation: the app spins down after 15 minutes of inactivity and takes ~30 seconds to wake up on the next request. For occasional personal use that might be fine. For something you want to share — where the first impression matters — that startup delay is bad.

Seven dollars a month for an always-on web application that solves Mixed Integer Linear Programs on demand. That cost structure didn’t exist 15 years ago. Commercial solver licenses alone would have cost more per year than this costs per month.

The First Live Run

Once Render showed the deploy as live, I went to the URL, uploaded the sample workbook, and clicked Run.

Status: Optimal. 86 assignments. All 7 staff. Exact match with the Excel output.

That match mattered. Not because I needed to prove the app worked — I’d already tested it locally — but because it confirmed the model was a faithful reproduction, not something that happened to produce similar results through different logic. The same constraints, the same objective function, the same data, the same answer.

The live app is at staff-scheduling.kindoflost.com.

Next post: what comes after this. There are 20 more models where this one came from.

The whole thing started small — just three files turned into one web app with zero web-development experience.

Tradeline Supply
Things that I use, like, and am affiliated with:
Mint Mobile offers great cell phone service for $15 flat, get $15 off using the link. Get discounted phones with service activation and no contract.
I never spend money before I check Mr Rebates or Rakuten to get cashbacks, rebates, discounts, coupons or cheaper gift cards.

Leave a Reply