I’m trying to deploy an elixir/phoenix app to Fly and I need to set up and attach an postgres database. I have already done this 2-3 times successfully in the past with small demo apps I’m working on, but now, all of a sudden, I always get “An unknown error occurred” when I try to run the “fly postgres attach” command.
(Incidentally, the error misspells “occurred” as “occured”.)
What can I do?
Ok, so I just started over and created an app with a name I had never used before and also created a Postgres database with a name I had never used before. Now it works. I think that when I delete an app through the Fly.io dashboard it is not really getting completely cleaned out – so reusing names appears to be a problem.
This is definitely a bug when the name exists. We can potentially just install a new user and reuse the existing DB. Showing “unknown error” is not ideal.