Hi there - I’m new to Fly and I have been trying to deploy a rails app (was previously using Heroku’s free plan).
I get “failed due to unhealthy allocation - not rolling back to stable job version 5 as current job has same specification and deploying as v6” at the tail end of the deployment process. When I run fly logs (see screenshot below), I get this error:
Preparing to run: /rails/bin/docker-entrypoint ./bin/rails server as rails
2023-03-22T08:55:10Z app[c4be202b]
[ r: UnhandledIoError(Os { code: 2, kind: NotFound, message: “No such file or directory” })
I did a bundle update and then ran bin/rails generate dockerfile. I still get the same error but fly logs now flag something else:
PG::ConnectionBad: FATAL: password authentication failed for user “sanuiljfszbqng”
FATAL: no pg_hba.conf entry for host “185.178.200.130”, user “sanuiljfszbqng”, database “da2rr66k61pq44”, SSL off
Running bin/rails generate dockerfile --postgresql makes no difference.
I solved the issue by running fly launch again and using a different app name. However, there are two issues in the deployed app: the db doesn’t seem to have migrated and some of the keys are missing.
How do I run something equivalent to db:seed and db:migrate on fly?