I’m checking out Fly and wow. Pretty great for deploying one off disposable apps - that I can get into ‘prod’. UI is great too. Really great.
I can launch/deploy my app, but then when I need to reset the db, I get this error:
> fly ssh console -C "bundle exec rails db:reset"
> Connecting to fdaa:a:6a0f:a7b:9f67:5464:fbf4:2... complete
> bin/rails aborted!
> ActiveRecord::ProtectedEnvironmentError: You are attempting to run a destructive action against your 'production' database. (ActiveRecord::ProtectedEnvironmentError)
> If you are sure you want to continue, run the same command with the environment variable:
> DISABLE_DATABASE_ENVIRONMENT_CHECK=1
Makes since, try that:
fly ssh console -C "DISABLE_DATABASE_ENVIRONMENT_CHECK=1; bundle exec rails db:reset"
Error: ssh shell: wait: remote command exited without exit status or exit signal
I can destroy and launch again, no worries! But I guess I’d like to know what is wrong as I move forward.