3 Docs Feeder 4 The Guide ~10 min

Deploying a site: how to ship to the internet without a meltdown

Hit ‘publish’ — and the site doesn't faceplant in front of everyone

Deployment in plain words: how to ship updates without crashes, hide secrets in environment variables, run a health check, and roll back in seconds.

ECC skills in this lesson: deployment-patterns

What deployment means, in plain words

You built a site. On your computer it works perfectly: pretty, fast, everything clicks. One problem. Not a single living soul sees it except you. For the site to reach the world, the project has to be shipped to the internet. That move is exactly what’s called deployment .

Compare it to moving into a new apartment. Option one: you haul every last piece of furniture out of the old place, then spend half a day dragging the new stuff in — and the whole time you don’t even have anywhere to sit. Option two: you bring in the new furniture, set it up, check that everything sits level, and only then clear out the old. Not a single second without a couch.

A good deploy is always option two. The user shouldn’t notice you touched anything at all. The site was working — and it keeps working, it just got better.

Sodi the friendly robot companion helps the cozy project-house move from laptop to cloud server across a tidy teal/mint bridge
Deployment is moving your project from your computer into the big internet. Sodi is your helpful companion.

Why a vibecoder should understand publishing a site

You’re a vibecoder. The agent writes the code for you. But you’re the one who hits ‘publish’ at the finish line. And you’re the one on the hook for a crashed site. When you understand how deployment works, you:

  • ship updates so that visitors notice nothing;
  • don’t flash your passwords and keys to the whole internet (the most common and most expensive rookie mistake);
  • know how to roll back in seconds, instead of frantically typing ‘undo it!!!’ to your agent;
  • understand what’s hiding behind scary words like rollback, health check, staging — and can calmly ask the agent to set it all up.

The difference between ‘I shipped the site and it’s down’ and ‘I shipped the site and everyone’s fine’ almost always comes down to four things: how you roll out, where you store secrets, how you check what’s alive, and whether you have a rollback plan. Let’s take them in order.

The four pillars of a calm deploy

1. How to roll out updates without crashes

Tiny site on a single server? Then it’s simple: the new version replaces the old, and that’s that. But once a project grows up, clever ways to update appear — ways where the site doesn’t go down for even a second. Here are the three big ones, from simplest to most bulletproof.

  • Rolling (in turns). You’ve got several copies of the site. You update them not all at once but one by one: while one is moving to the new version, the others keep serving visitors. Nobody’s left without a site.
  • Blue-green (two environments). Two identical copies: ‘blue’ is running right now, ‘green’ stands ready with the new version. You check green, flip the switch, and all the traffic moves there. Something off? Flip it back — instant rollback.
  • Canary (the canary). The new version is seen by only 5% of visitors at first. They’re happy — you open it to half, then to everyone. The name comes from miners’ canaries: if something’s wrong, you find out on a small group instead of on everyone at once.

2. Where to keep secrets: environment variables, not code

This is the most important rule of the lesson. Your project has secrets : the database password, the payment-service key, the bot token. If they’re written straight into the code, then the moment the code rides out to the internet (and it does — to GitHub, for example), the secrets ride out with it and become visible to anyone.

The right way is to keep them in environment variables . It’s like your apartment keys: they aren’t painted on the door, they sit in your pocket. The code knows: ‘the key exists somewhere, I’ll grab it when I need it’ — but the key itself isn’t in the code.

3. Health check: the service page that says ‘you alive?’

A health check is a tiny service page, say at /health, that simply answers ‘I’m fine here.’ You’ll never visit it yourself. It’s for machines, not people.

So what’s it for? Every half-minute the server pings that page and asks: ‘alive?’ It answers ‘yes’ — great, carry on. It goes silent or throws an error — the server figures the project has frozen, and can restart it on its own or stop sending people to it. It’s like a patient’s pulse: the monitor beeps steadily, everyone’s calm; the signal drops, a nurse comes running.

Sodi as helpful companion stands beside the server-doctor listening with stethoscope to the project-house; steady /health pulse on monitor
A health check is your project's pulse. The server listens to it itself, without you. Sodi helps and supports.

4. The rollback plan: the ‘put it back how it was’ button

It happens even to pros: you ship an update and it breaks the site. The difference between a pro and a beginner is exactly one thing: the pro has a ‘back’ button. That’s the rollback .

On decent platforms a rollback is literally one button or one command: ‘restore the previous version.’ The old working build is always kept saved. So the right way to think while deploying isn’t ‘just let it fly,’ it’s ‘if it doesn’t fly — how do I bring it all back in 10 seconds?’

Good deploy vs. bad deploy: a comparison

A calm deploy
  • Secrets in environment variables, not in the code at all.
  • There's a health check — the server sees on its own when the project goes down.
  • Versions are clearly tagged, the old working build is saved for rollback.
  • You ship to a test environment (staging) first, then to production.
  • Before publishing you ran through a readiness checklist.
A deploy on a wing and a prayer
  • Passwords and keys hardcoded straight into the code and shipped off to GitHub.
  • No checks at all — you learn about the crash from angry users' messages.
  • There's nowhere to roll back to: nobody saved the old version.
  • You ship straight to the live site, testing on real people.
  • You deploy on a Friday evening and head out — a genre classic.

Staging is its own hero on this list. It’s a copy of your site where you check everything first, and only then ship to production. Cheap, boring, and it spares you a truckload of nerves.

A real-life example: how a bot token leaks

You had an agent build a one-page business-card site with a sign-up form. The form sends requests to you on Telegram via a bot — and that needs a bot token. The agent quickly dropped the token straight into the code, you were thrilled that everything worked, and you pushed the project to public GitHub. By evening your bot is spamming strangers, and the site loses the form for a couple of minutes on every update, because you ship straight to the live version. Fun, right?

What went wrong:

  1. The token lived in the code and leaked into the open repo — bots picked it up within minutes.
  2. There was no health check or staging — updates were tested right on the live site.
  3. There was no rollback plan — when the form broke, there was nothing to restore the working version from.

And here’s how a vibecoder who gets it would do it. They’d just frame the task to the agent properly.

Prompt — copy it and give it a try

Help me get my project ready to publish to the internet. Do it step by step:

  1. Find all the secrets in the code — tokens, passwords, keys. Move them into environment variables and create an example env file with empty values. Make sure the real secrets do NOT end up in the repository — add them to gitignore.
  2. Add a simple health check at the address slash health that responds with an ok status.
  3. Explain in plain words how, on my platform (I use Vercel), to roll back to the previous version if the new one breaks.
  4. Before you tell me everything’s done, run through a short publishing-readiness checklist and show it to me with checkmarks.

Show each step separately and wait for my ok before moving on.

Publishing-readiness checklist: 60 seconds before the button

Before you hit ‘publish,’ run your eyes over this. It’s a simplified version of the professional checklist from the deployment-patterns skill:

  1. Tests passed? If the agent wrote tests — are they green?
  2. No secrets in the code? Not a single password, key, or token sitting in the files.
  3. Health check responding? Go to /health — does it say ‘ok’?
  4. Know how to roll back? Not ‘I’ll figure it out if I have to’ — you know the command or button right now.
  5. Checked on staging? The update lived on a test copy first, not straight on production.
  6. Time chosen wisely? Not a Friday evening, and not five minutes before an important meeting.
Meme: Sodi the friendly mascot robot blissfully presses huge DEPLOY button Friday 6 PM holding coffee, clock and weekend exit door
The sacred rule of the internet: don't deploy on a Friday evening. Sodi as playful helpful companion.

A pixel cheat sheet

Pixel art: four icons — lock-secret, pulse-heart, back button, deploy rocket — with Sodi the helpful companion mascot presenting them
The four pillars of a calm deploy in a single screen. Sodi helps you remember.

Common rookie mistakes when deploying

  • Hardcoding secrets into the code. They’ll leak out with the project. Only environment variables, no exceptions.
  • Shipping straight to production. Staging first, then the world. Otherwise you’re testing on real people.
  • Having no rollback plan. ‘If it breaks, I’ll figure it out’ isn’t a plan. A plan is a ‘back’ button you know about in advance.
  • Ignoring the health check. Without it, you’re the last to learn about a crash — from angry users.
  • Deploying on a Friday evening. Old engineering wisdom: it’ll break exactly when there’s no one left to fix it.
  • Changing the database ‘forever’ in a rush. Delete data with the new version, and a code rollback won’t bring it back.

TL;DR - если коротко

  • Deployment is moving your project from your computer onto the internet, to real people. The best move is the one nobody notices.
  • Roll out the new version gradually and keep a backup nearby. Something breaks? Bring back the old one in seconds (rollback).
  • Secrets — passwords and keys — never live in the code. Only in environment variables. Otherwise they ride out to the internet along with your project.
  • Add a health check — a tiny page that says ‘I'm alive.’ The server uses it to tell whether everything's fine, on its own.
  • Before publishing, run a checklist: tests, secrets, rollback plan. A minute of boredom = a peaceful night.
  • These habits are the same whether it's a landing page or a giant app. And every one of them can be handed to an agent.

Search Wiki

Press Esc to close

Enter a search term to query all course pages and lessons.