Complex projects runner for Elixir projects

Hi all.

I just started a full-time job as a Elixir developer :star_struck:.
Previously I worked mostly with Ruby stack and we used a lot Procfile with foreman to start complex applications (e.g. I need to start one job worker, front-end server and the application itself).

Didn’t find anything like this for Elixir projects. Maybe you have tips and/or suggestions how you solve?

Well done for the Elixir job :slight_smile:

There might be less need for tools like foreman w/ Elixir/Erlang… You could look at the first diagram of mentionned post to understand why.

TL;DR

Starting an Elixir application can start a job worker, a fontend server, the application and much more :slight_smile:

Thank you for your answer!
To be honest, I didn’t find an answer for my question. Maybe I missed something.

I understand, that I can replace many things in Elixir which I used in Ruby. But my question is how to run a development environment where I need to run external tools?
Like, in my case, I have one legacy Python application, Python tasks (data analysts tasks) and webpack FE. So I need to run all of them only for dev, because a production deployment is a different story. At the moment there is Makefile, which is not my preferable tool, or I can run everything manually.

For webpack, it could done in the config/dev.exs, the watchers param.

But I am not aware how to ensure your python apps has started…

1 Like

unsure what your python deps are - and what are the production deployment? you could include them in the elixir project…

either way for the dev thing maybe look at how https://github.com/joshuafleck/ex_ngrok starts up in the dev env - believe it should be applicable in starting up an external app in dev… (btw - an abstraction of this could be interesting - lots of us are migrating :wink: )

You can use a System.cmd to start an application from a mix task

it looks like you could put all stuff in docker compose …

That is how I did actually.
Now I think I can use a watcher (or Mix task) to run it automatically.
Thanks anyway!

For local development you could also install forego globally and it to start the related application. But the best approach depends on how you are running those related applications in production.

https://shift.infinite.red/foreign-processes-and-phoenix-555179c24151

linked to from here - ex_ngrok/bin/wrap at master · joshuafleck/ex_ngrok · GitHub