Recipe Book

Treat deployment as part of the product

A release is more than a file transfer. Make it observable, repeatable, and possible to undo.

A feature is not finished when it works on a development machine. It is finished when the running product uses the new code, keeps its data, and still behaves as expected after a restart.

For a small application, a deployment process can be simple. It should still answer a few concrete questions.

What exactly is changing?

Separate application files from persistent data and credentials. A release should replace code deliberately, without accidentally replacing a database or a local configuration file.

Record the version being deployed. If a browser and server have separate components, make their versions visible during diagnosis. A successful upload does not prove that an existing browser tab is running the new script.

What proves the release is usable?

Check the application through the same public entry point a visitor uses. An internal health response is useful, but it does not exercise the reverse proxy, authentication, or delivery of frontend assets.

For a simple publishing application, a useful check is concrete: sign in, save a private draft, publish it, and open the resulting public URL. Use disposable test content and remove it after the check.

What happens when a process exits?

Run a long-lived application under a service manager. Configure its working directory, environment, restart behavior, and startup after a reboot. Send logs somewhere that remains available after the terminal session ends.

A service manager can restart a failed process. It cannot tell you that a release is logically correct. Those are separate responsibilities.

How do you go back?

Keep the previous release and a consistent backup of persistent data. Write down the rollback steps before changing a schema. If the new code writes data that the old code cannot read, replacing the executable alone is not a complete rollback.

The goal is not a complicated release pipeline. It is a small set of repeatable steps that turn an uncertain change into something you can inspect and recover from.