Storing RunNginx status in the deployments table
After running jobs.RunNginx() in the background, I ran into a new problem…
As I showed in my previous build log here… the frontend could get an instant response, but it still had no way to know what was currently happening inside the goroutine.
That is why I started saving deployment data into PostgreSQL.
I used the table name deployments because this PaaS will eventually handle multiple deployments in the future. Right now it is still just pulling nginx, but I want the naming to already match the direction of the project.
For now, the migration is still written directly inside main() and only creates id and status columns. It is still very early and not modular yet… I will clean that up later.
The main reason I saved this into the database was to fix the problem from the previous build log. Instead of letting the background job run without any visible state, I can now store its status first.
So this step was less about Docker itself… and more about creating a place where the frontend can eventually read the current state of a deployment.