How to deploy Elixir Project (Not phoenix) with a HTTP server to Gigalixir?

I am trying to deploy an elixir project (without phoenix framework) in to Gigalixir and so far I have had no success. Can some please tell me how to set up this? I have a HTTP server in the project. I tried with Heroku and it kept crashing, with Gigalixir I deployed it, but then its returning 503

defmodule Coport.Application do
  @moduledoc false

  use Application

  @impl true
  def start(_type, _args) do
    children = [
      {Plug.Cowboy,
       scheme: :http,
       plug: Coport.Router,
       options: [port: Application.get_env(:coport, :port, 8008)]},
      Coport.Caller
    ]

    opts = [strategy: :one_for_one, name: Coport.Supervisor]
    Supervisor.start_link(children, opts)
  end
end

This is how my application looks

How are you starting your application?

Sounds like a job for mix run --no-halt
https://hexdocs.pm/mix/1.12/Mix.Tasks.Run.html


EDIT:
This gigalixir documentation suggests using mix specific buildpacks to call the no halt command.

4 Likes

Worked :partying_face: Thanks

Hi, do you have the complete steps or a link for documentation on how to deploy an elixir project without phoenix to Gigalixir? I’m new in Elixir and I wanted to deploy my elixir app to Gigalixir, but I don’t know where to start.