Journal

Production engineering

From commit to public domain

I see deployment as a series of decisions about the code we ship, the environment that runs it and how the team can recover.

From GitHub to a live service
  1. 01GitHubReview the change and run checks.
  2. 02Docker imageBuild and identify the release.
  3. 03EnvironmentDeploy and check service health.
  4. 04HTTPS trafficConnect the domain, monitor and respond.

Know exactly what ships

Trace a live version back to its code
  1. Reviewed commit
  2. CI checks
  3. Identified Docker image

Before deploying, I want to answer three questions. What change ships, what shows it works, and how will we respond if users encounter an error? A GitHub Actions workflow can run checks after review and build a Docker image associated with the commit. I can then verify the same artifact in staging and production. The image identifier ties the running service back to reviewed code.

I supply secrets and environment-specific settings at runtime. I keep them out of the repository and image. Data and files that must survive container replacement get their own storage. For a migration, I check whether the previous version will still work during the transition. If it cannot, we need a recovery plan beyond switching back to the previous image.

Connect domains and isolate environments

From domain name to target environment
  1. Domain and DNS
  2. Reverse proxy and HTTPS
  3. Environment service and database

On a Linux server, DNS directs a domain to the entry point. A reverse proxy accepts HTTPS requests and forwards them to the intended service. The public domain might serve the UI and api.example.com might point to the backend. The choice between a path on the same domain and a subdomain affects cookies, cross-origin rules and URLs used by mobile apps.

A different hostname alone does not isolate staging from production. I also check databases, credentials, integrations and callback URLs. A test request that triggers a real payment or writes to the wrong database is a configuration problem. I document the path from a public request to the service and the settings that make that path environment-specific.

Verify the service from the user’s perspective

Decide what to do after release
  1. Check a public workflow
  2. Review errors and latency
  3. Confirm or restore

After the container starts, I check a representative operation through the public domain. A process can be running while certificates, routing or the database still block users. I watch errors, latency and logs during release. If the release degrades a workflow, I communicate the symptom, impact and action under way. A rollback restores code. Recovering data or handling operations already started calls for a separate decision.

References

All articles