Infrastructure isn't something to postpone until "the product works and we need to deploy it."
We write the Dockerfile and compose stack in the project's first week, before the first real feature is done. It forces us to think about environment variables, migrations, queues, and logging the way they'll actually behave in production — not however they happened to work on a developer's laptop.
When a project needs to move to a different server, it takes hours, not weeks — because the whole configuration already lives in code, not in someone's head.
We write the Dockerfile and compose stack in the project's first week, before the first real feature is done. It forces us to think about environment variables, migrations, queues, and logging the way they'll actually behave in production — not however they happened to work on a developer's laptop.
When a project needs to move to a different server, it takes hours, not weeks — because the whole configuration already lives in code, not in someone's head.