Using Burrito with Phoenix

Hi Folks,

I am trying to get my Phoenix 1.7.1 app to build with Burrito.

I can’t quite work out what’s needed to make it build, and also start correctly.

I have releases configured, and stand alone releases build and run correctly.

The docs state to add a release function to mix.exs, which I have done, and I have added a releases key to the project function, but it doesn’t seem to be triggering the burrito part of the release, just the regular release.

I think I’m probably missing something here to correctly link a Phoenix release to Burrito.

  def project do
    [
      app: @app,
      version: "0.1.0",
      elixir: "~> 1.14",
      elixirc_paths: elixirc_paths(Mix.env()),
      start_permanent: Mix.env() == :prod,
      aliases: aliases(),
      deps: deps(),
      releases: [{@app, releases()}]
      # releases: [releases()]
    ]
  end
  def releases do
    [
      wc_tally: [
        steps: [:assemble, &Burrito.wrap/1],
        burrito: [
          targets: [
            macos: [os: :darwin, cpu: :x86_64],
            linux: [os: :linux, cpu: :x86_64],
            windows: [os: :windows, cpu: :x86_64]
          ]
        ]
      ]
    ]
  end

Any help greatly appreciated!

Are you getting any error messages with the build command?
Do you have anything at all in src/@app/burrito_out/ after the build command?
Can you post the full mix.exs and your installed Zig version?

Thanks for the reply, I was being stupid, I just needed to adjust my releases function to be this instead.

  def releases do
    [
      wc_tally: [
        steps: [:assemble, &Burrito.wrap/1],
        burrito: [
          targets: [
            macos: [os: :darwin, cpu: :x86_64],
            linux: [os: :linux, cpu: :x86_64],
            windows: [os: :windows, cpu: :x86_64]
          ]
        ]
      ]
    ]
  end

Still struggling to get a windows build to work, but that’s a separate issues . . .

Thanks

1 Like