 
   @doc false
   def run(args) do
-    docker? = "--docker" in args
-    ecto? = "--ecto" in args || Code.ensure_loaded?(Ecto)
+    opts = parse_args(args)
 
     if Mix.Project.umbrella?() do
       Mix.raise("""

    Your application is ready to be deployed in a release!

    See https://hexdocs.pm/mix/Mix.Tasks.Release.html for more information about Elixir releases.
    #{if docker?, do: docker_instructions()}
    Here are some useful release commands you can run in any release environment:

        # To build a release

      {:eex, "rel/server.bat.eex", "rel/overlays/bin/server.bat"}
    ])

    if opts.ecto do
      Mix.Phoenix.copy_from(paths(), "priv/templates/phx.gen.release", binding, [
        {:eex, "rel/migrate.sh.eex", "rel/overlays/bin/migrate"},
        {:eex, "rel/migrate.bat.eex", "rel/overlays/bin/migrate.bat"},
