How do I run a Phoenix remote console to access IEx in production?

In Rails and Heroku, you can do heroku run rails console and do some stuff against prod and prod’s database.

How can I do this in Phoenix in

All you have to do is run:

fly ssh console -C "./app/bin/my_app remote"

Where my_app is the name of your Phoenix application as defined in mix.exs:6.

defmodule MyApp.MixProject do
  use Mix.Project

  def project do
      app: :my_app,