Drop Netlify: why a Netlify deploy costs more than Granite.so

By Mark Hayes
Drop Netlify: why a Netlify deploy costs more than Granite.so

Let's say the quiet part out loud: Netlify was never built for your SaaS backend. It was built for the Jamstack, a world of static HTML, a CDN and a sprinkle of serverless functions. It's superb at that. The trouble starts when a founder with a working docker compose setup, a Postgres database and a background worker tries to squeeze all of it through a Netlify deploy, because the platform said "Deploy" and the free tier said "$0."

What you get is not one platform. It's Netlify for the frontend, a separate database vendor, another host for anything that runs longer than a function timeout, an S3 bucket somewhere else, and a backup script you wrote at midnight. Four dashboards, four invoices, and you're on call for all of them.

This post explains exactly how a Netlify deploy works, answers the "is Netlify free?" question honestly, and shows where the real cost of running a SaaS on it comes from. Then it walks through moving the whole stack onto one fixed-price platform.

How a Netlify deploy actually works

Credit first. Netlify's deploy workflow is excellent and much of the industry copied it.

Continuous deployment from Git

Connect a GitHub, GitLab, Bitbucket or Azure DevOps repo. Netlify runs your build command, publishes the output directory to its CDN, and gives every pull request a Deploy Preview URL. Merges to the production branch go live atomically, and you can roll back to any previous deploy with a click.

netlify.toml

Build settings, redirects, headers and function locations live in a netlify.toml at the repo root:

[build]
  command = "npm run build"
  publish = "dist"
  functions = "netlify/functions"

[[redirects]]
  from = "/api/*"
  to = "/.netlify/functions/:splat"
  status = 200

[[headers]]
  for = "/assets/*"
  [headers.values]
    Cache-Control = "public, max-age=31536000, immutable"

The CLI

npm install -g netlify-cli
netlify login
netlify link            # connect the folder to an existing site
netlify dev             # run locally with functions and redirects
netlify deploy          # draft deploy with a unique URL
netlify deploy --prod   # publish to production
netlify env:set STRIPE_SECRET_KEY "$STRIPE_SECRET_KEY"

Functions

Server code runs as Netlify Functions: per-request serverless handlers with execution time limits. At the time of writing, standard synchronous functions time out after seconds, not minutes, and longer "background functions" exist for async work with their own limits and plan requirements. Check Netlify's current docs for the exact numbers on your plan.

That's the entire compute model. There's no place to run your Docker image and no long-lived process that you control.

Is Netlify free?

Yes, there's a free plan, and for a personal site or a marketing page it's genuinely generous. For a SaaS with paying users, "free" needs an asterisk.

  • Pricing models change. Netlify has moved new accounts toward a credit-based model, where bandwidth, requests, function compute and builds all draw from a monthly allowance. Older accounts may still be on legacy plans with different limits. Read the pricing page for your account, not a blog post from two years ago (including this one).
  • Running out has consequences. Depending on your plan, exceeding the allowance can mean upgrading, paying for more usage, or having your site paused until the next cycle. Paused is not a word you want next to "production" during a beta.
  • Traffic you didn't invite still counts. In 2024 a developer shared a six-figure bandwidth bill on a free Netlify static site after a traffic attack. Netlify waived it, and it was an extreme case. But it's a useful reminder: on metered platforms, bots and bugs spend your money.
Netlify is free the way a gym trial is free. It's a great deal, right up until you actually start using it for work.

Where a Netlify deploy gets expensive for a SaaS

The Netlify invoice itself is rarely the problem. The problem is everything the Netlify deploy can't hold, which you now buy somewhere else.

1. Your backend doesn't fit in a function

A real SaaS backend often has:

  • Requests that take longer than a function timeout (report generation, imports, AI calls)
  • A worker consuming a queue
  • WebSockets or server-sent events
  • A dependency on system packages baked into a Docker base image

None of those are natural in per-request functions. So you either rewrite, or you host the backend elsewhere. Now you have vendor #2.

2. Your database lives somewhere else

Netlify doesn't run your Postgres container. Database options come through partner integrations and add-ons, which means a separate account, plan, set of limits and invoice. That's vendor #3. Functions also open lots of short-lived connections, so you often need a pooler or a serverless-friendly driver on top.

3. File storage is another account

User uploads need object storage. Netlify's own blob storage exists, but many teams end up with an S3 bucket at a separate provider, plus CDN configuration, plus IAM credentials. Vendor #4.

4. Backups are your job again

If the database vendor's backup retention on your tier doesn't match what you need, you write a pg_dump cron somewhere. It needs a host to run on. Congratulations, you're running a server again, which is exactly what you were trying to avoid.

What that stack actually looks like

NeedNetlify-centric stackWho's on call
Frontend + previewsNetlifyNetlify
API that outlives a timeoutSeparate app hostYou, across two platforms
Background workerAnother host or queue serviceYou
PostgresDatabase vendorVendor + you for integration
Uploads + CDNStorage vendor + CDN configYou
Extra backupsYour cron job on some boxYou, at 2 AM

Every one of those vendors has a sensible price on its own. Add them up and you have four free tiers with four different ways to run out, and a monthly total you can't predict. That's why a Netlify deploy "costs more" for a SaaS: not because Netlify is greedy, but because it's only one piece of the bill.

One platform, one bill: moving the stack to Granite.so

Granite.so is built for the shape your app actually has: Docker containers that run continuously, a managed database next to them, and storage with a CDN. Here's the migration.

Step 1: deploy your Docker image from GitHub

Connect the repository. Granite.so builds from your existing Dockerfile and redeploys automatically on every push, the same Git-driven workflow you liked on Netlify. If you already publish images to a registry, deploy the image directly.

Before your first deploy, make sure the server binds to all interfaces and reads its port from the environment:

app.listen(Number(process.env.PORT) || 8080, "0.0.0.0");

If your API currently lives in Netlify Functions, the fastest path is often wrapping those handlers in a small Express, Fastify or Hono server. The business logic stays the same; only the entry point changes.

Step 2: run your worker as a real process

Deploy the worker as its own service from the same repo, with a Dockerfile whose CMD starts the worker. No timeout, no "background function" workaround. It runs the way it runs in docker compose.

Step 3: create a managed Postgres database

Automatic backups are included, so the midnight pg_dump cron can be deleted. Move your data:

pg_dump -Fc --no-owner --no-acl "$OLD_DATABASE_URL" -f app.dump
pg_restore --no-owner --no-acl -d "$NEW_DATABASE_URL" app.dump

Then compare row counts on your biggest tables before you cut over:

SELECT relname, n_live_tup FROM pg_stat_user_tables ORDER BY n_live_tup DESC LIMIT 10;

n_live_tup is an estimate, which is fine for a sanity check. Use SELECT count(*) on critical tables if you want exact numbers.

Step 4: move uploads to S3-compatible storage with CDN

Create a bucket, sync your existing files with any S3 tool, and point your app at it through environment variables:

aws s3 sync "s3://old-bucket" ./uploads-backup
aws s3 sync ./uploads-backup "s3://$S3_BUCKET" --endpoint-url "$S3_ENDPOINT"

The CDN is built in, so there's no separate CDN account to configure.

Step 5: set env vars and switch DNS

Copy every variable from Netlify, your backend host and your database vendor into the Granite.so dashboard. Deploy, test on the platform URL, lower your DNS TTL a day early, then switch.

What it costs

  • Hobby: $9/month, including $15 of usage credits each month. Typically enough for an MVP-sized app, worker, database and storage while you onboard your first beta users.
  • Advanced: $39/month when you need more headroom.

Check the pricing page for current resource rates. The point is that you know the baseline before you deploy, and it's one invoice to explain to investors instead of four.

Should you keep Netlify for anything?

Being fair: if you have a static marketing site or a docs site, Netlify is still a fine home for it. Deploy Previews on a content site are great, and a static site costs very little to serve. Plenty of teams keep www. on Netlify and move app. and api. elsewhere.

What doesn't make sense is contorting a stateful, container-shaped SaaS into functions and add-ons just because the first deploy was easy.

Migration checklist

  • Inventory every vendor: frontend, API host, worker, database, storage, backups
  • Wrap Netlify Functions in a small HTTP server if the API lives there
  • App binds 0.0.0.0 and reads PORT
  • Repo connected, app and worker deployed from the Dockerfile
  • Managed Postgres created, dump restored, row counts checked
  • Uploads synced to S3-compatible storage, app pointed at the new bucket
  • Env vars copied, DNS TTL lowered, cutover done
  • Old vendors cancelled once a quiet week has passed

Drop the vendor pile, not your weekends

A Netlify deploy is a fantastic way to publish a static site. It's an expensive way to run a SaaS, measured in vendors, invoices and nights on call rather than just dollars.

If you want your Docker app, worker, Postgres and storage in one dashboard at a price you can say before you deploy, move your stack to Granite.so and spend the next six weeks shipping for your beta users.

Keep reading

More posts tagged “Community”.
Be first in line for updates
and special pricing
Get early access to new features and exclusive discounts delivered straight to your inbox