Failed to run Lightning via Docker (Lightning #541)

I was trying to follow the steps written in the of OpenFn/Lightning

When executing docker compose run --rm web mix ecto.migrate, I faced this error:

=> ERROR [dev 14/18] RUN mix openfn.install.runtime 1.5s

[dev 14/18] RUN mix openfn.install.runtime:
#0 0.875 Generated lightning app
#0 1.465 ** (Mix) The task “openfn.install.runtime” could not be found

failed to solve: executor failed running [/bin/sh -c mix openfn.install.runtime]: exit code: 1

I think the root cause is this one.

Oh it has been issued in docker compose up not working for local linux builds · Issue #541 · OpenFn/Lightning · GitHub

Hey Levi, apologies, we haven’t had much demand for local Docker builds recently. And yes, that’s the right place to track the issue.

I’ve just rebased my old branch “fix_dockerfile_dev” so it’s up to speed with main again:

Try pulling and running from my branch and let me know how you get on!

Greetings Taylor, I’ve tried it. When I ran docker compose up, I get this error:

$ docker compose up
[+] Running 1/0
 - Container lightning-postgres-1  Running                                                                                                                                                                0.0s 
Attaching to lightning-postgres-1, lightning-web-1
lightning-web-1       | [notice] Application mnesia exited: :stopped
lightning-web-1       | [notice] Application lightning exited: exited in: Lightning.Application.start(:normal, [:timex])
lightning-web-1       |     ** (EXIT) an exception was raised:
lightning-web-1       |         ** (FunctionClauseError) no function clause matching in Keyword.get/3
lightning-web-1       |             (elixir 1.14.1) lib/keyword.ex:388: Keyword.get(nil, :name, Oban)
lightning-web-1       |             (oban 2.14.2) lib/oban.ex:237: Oban.child_spec/1

Also, could you please tell me the deployment steps for production env? I saw Lightning/ at main · OpenFn/Lightning · GitHub but still don’t understand. Thank you.

OK yeah… looks like that branch still needs love. How strong is your Docker game!? Could this be your first Lightning contribution? :pray: :raised_hands:

Re: prod deployment… if you’re not super comfortable with Elixir and deploying OTP apps for production generally, I’d recommend using a pre-built image: Docker

:warning: Also please note that Lightning has not reached a stable release yet and we don’t consider it production ready—so beware!

Finally, for what it’s worth, doing contracted work for high quality deployment and/or hosting of OpenFn (both the for the battle-tested v1 and for new open-source v2/Lightning instances) is how OpenFn stays in business and provides this software as a DPG! I’m happy to chat about a deployment or support contract at any time if you shoot me an email—you’ve already got my deets. Interacting with you and your team at SID Indonesia has been lovely and we’d be thrilled to help out in an official capacity.

Here’s what I did to get it working on my machine:

1 Like

merged! thanks @davemenninger .

hey @Levi , check out the new Dockerfile-dev - dave seems to have it working on his machine.