Fixing misplaced context timeout in RunNginx
I noticed the timeout logic in RunNginx() was not placed in the right spot…

Before this, I was creating one context.WithTimeout(..., 10*time.Second) at the top and then reusing it for the database update. The problem is that the same context setup made the flow look like it was controlling the whole process, even though docker pull nginx:latest can easily take longer than 10 seconds.
So I split it into two contexts. The first one is pullCtx with a 5 minute timeout for exec.CommandContext(...), and the second one is a separate 10 second context just for updating the deployment status in the database.
The main reason I changed this was to make the deadline match the actual job. Pulling an image is a different kind of operation from writing a small status update to PostgreSQL, so it makes more sense if each one has its own timeout.
The result is much clearer now… the Docker process gets enough time to finish, while the database update still has a short deadline. I also simplified the flow a bit by storing the final status in a variable first, then writing that status once at the end.
One small insight I got here is that context in Go is easy to place in the wrong layer if I am not careful. In simple terms, it is basically the deadline I give to a process… so if that deadline is attached to the wrong thing, the behavior becomes misleading pretty quickly.