DevOps and Delivery

A deploy is only finished when you can prove the new version is serving.

3guides Feed

Delivery is the path from a commit to a running process, and the interesting question at every step is what happens when it fails.

The shape that works for most self-hosted applications is three stages: test, build a versioned artifact, deploy that exact artifact. Building once and promoting the same image is what makes the pipeline meaningful — if the deploy rebuilds, the thing running is not the thing you tested.

Reach for a full pipeline as soon as more than one person deploys, or as soon as you have deployed from a laptop at an inconvenient hour. Below that, a script in the repository is genuinely fine and has fewer moving parts.

Three properties separate a pipeline that helps from one that provides false confidence. Artifacts are tagged by commit, so rolling back is redeploying a tag that already exists rather than rebuilding an old commit. The deploy step waits for health rather than returning when a container is created. And there is one real request against a real URL afterwards, because a container can be healthy by its own definition and still be serving errors.

The security dimension is easy to underweight. A pipeline runs with access to production credentials and is edited by anyone who can open a pull request. Per-job permission scoping, environment secrets behind a required reviewer, and third-party actions pinned to a commit rather than a mutable tag are the three controls that matter most, and none of them cost anything.

Start here

How to Build a GitHub Actions Deployment Pipeline

Test, build a container image, push it to GHCR and deploy it to a VPS over SSH — with the concurrency guard, environment approval and token scoping that keep the pipeline from becoming the weak point.

Intermediate · 4 min read

Beginner to advanced

A reading order that builds DevOps knowledge in the sequence it is actually needed.

  1. Build How to Build a GitHub Actions Deployment Pipeline 4 min
  2. Operate Zero-Downtime Deploys in Dokploy with Docker Health Checks 4 min

Common problems

Failure modes that come up repeatedly with DevOps, and where each one is solved.

The pipeline goes green while the application is down
The deploy command returned before the container was ready. Wait for health checks and add a smoke test that actually requests a URL.
Rolling back means rebuilding
Images were tagged `latest` instead of by commit. Tag by SHA so a rollback is redeploying a tag that already exists.
Two deploys run at once and fight
No concurrency control. A workflow-level group that queues rather than cancels is the smallest fix.
Every release drops requests for a few seconds
No health check, so the orchestrator shifts traffic before the new version can serve it.

Latest DevOps guides

Browse the archive
  • intermediate

    How to Build a GitHub Actions Deployment Pipeline

    Test, build a container image, push it to GHCR and deploy it to a VPS over SSH — with the concurrency guard, environment approval and token scoping that keep the pipeline from becoming the weak point.

    4 min AI-assisted
  • intermediate

    How to Back Up Docker Volumes Automatically

    A nightly backup for a self-hosted Docker host: database dumps taken with the right tools, file volumes snapshotted with restic, a systemd timer to run it, and a restore test that proves it works.

    4 min AI-assisted

Recently updated

  • intermediate

    How to Back Up Docker Volumes Automatically

    A nightly backup for a self-hosted Docker host: database dumps taken with the right tools, file volumes snapshotted with restic, a systemd timer to run it, and a restore test that proves it works.

    4 min AI-assisted

Frequently asked questions

Should the container image be built in CI or on the server?

In CI. Building on the target consumes the resources your application needs and means the artifact that ships was never tested — you tested a different build of the same commit.

What is the minimum viable deployment safety net?

Tag images by commit SHA, wait for health checks before declaring success, run one smoke request against a real URL, and know the command that redeploys the previous tag. Four things, none of them large.

How much CI is too much for a small team?

When the pipeline takes longer than the change did, people stop running it locally and start pushing to see what happens. Keep the fast checks fast and move anything slow to a nightly job.

Sources

  1. GitHub Actions documentation GitHub Primary source
  2. Docker build with GitHub Actions Docker Primary source
  3. Swarm rolling updates Docker Primary source