Status: critical | connection refused

Long story short: I had recently destroyed a whole db-app and then created a new one. Attached this new db-app to my-app.

But now my-app never deploys because it keeps waiting for health checks.

servicecheck-00-http-8080    critical    connect: connection refused

What is this all about?

Not exactly sure why, but apparently my web server was running on 127.0.0.1 even though in development it runs in 0.0.0.0 (where Fly io is expecting it).

I don’t know much about Docker, but I have a command: rails s -b 0.0.0.0 in my docker-compose.production.yml that doesn’t seem to be doing anything.
In my Dockerfile I had CMD ["./bin/rails", "server"] and I thought that could be it. Changed it to CMD ["./bin/rails", "server", "-b", "0.0.0.0"]. That fixed it. Mostly.

But some error was still happening — can’t remember if it was the same or not.
But I noticed on those “Puma is listening on…” lines that it was running in development. I checked Puma files and it seems to be looking for a RAILS_ENV secret. Just set that to production and it’s finally passing.

There it is for someone in the future.