How we ship novixa.dev: from push to production without touching the server
One server and a small team — yet no release reaches production without passing tests and a backup, and it rolls itself back if it does not work. A real description of the pipeline that runs this site.
Small companies often deploy by copying files to the server by hand. It works until the day it does not: an update breaks the home page in the evening, and nobody knows what changed or how to go back. We decided our own site should be deployed the way we tell clients their systems should be.
Step one: nothing ships before the tests
Every change pushed to the main branch goes through automated checks: type checking, linting, unit tests, integration tests against a real PostgreSQL database, a production build, then tests that open the site in a real browser at desktop, tablet and phone sizes. Any failure stops everything.
Step two: one fixed image
Once the checks pass, a container image of the release is built and tagged with the exact commit that was tested — not whatever the branch points at by the time deployment runs. What was tested is what ships.
Step three: a backup before any change
On the server, the first thing the deploy script does is back up the database. If the backup fails, the deploy stops; we do not deploy over data that has no copy. Alongside that, a scheduled nightly backup runs, and backups are kept for two weeks.
Step four: does it work, or does it go back?
The new release starts and the database migrations are applied, then the script waits for the application to report itself healthy. It then asks the health endpoint two questions: are the database and mail working, and is the build answering the commit we just deployed? If either answer is no, the server rolls back to the previous release automatically.
Step five: a check from outside the server
The last check runs from the internet, through the same network visitors use: it requests the health endpoint and confirms it reports the new version, then opens the Arabic page and confirms its canonical link. A server that is healthy internally is not enough if visitors cannot see it.
Secrets never pass through the logs
The repository is public, and so are the deployment logs. So the database password and session secret are generated on the server and never leave it, the admin password is turned into a hash before it reaches the server, and no line in the pipeline prints a secret.
What this means for our clients
This is the same approach we apply when we host a client’s system: tests before deployment, a backup before every release, automatic rollback on failure. What varies by project is where the server lives, how often backups run and the response times — and those are written into the service agreement.