Skip to content
anythingai.space
Deployment & Deliveryintermediate11 min · 10 steps

Environment Configs

Keep what differs between dev, staging and production out of the code and the image, so one tested image behaves correctly everywhere.

fell backintendedStaging APIintegration testssettings.pyurl = os.getenv(…, PROD)Prod ServiceNowreal ticketstest commentsSub-prod ServiceNowtest records
requesterrordatasignalheavy work
1 / 10
ProblemStep 1 of 10

Staging updated real tickets

The staging environment ran its nightly integration tests — which create, update and close tickets. Next morning, the service desk found test comments on real tickets (illustrative).

The cause: the ticketing URL was an env var with a default in code pointing at production. Staging never set it, so it silently fell back to the production instance.

Watch outA default value for an environment-specific endpoint is a bug waiting for the one environment that forgets to override it.

Lesson 7 of 20 in Deployment & Delivery