openFN Lightning docker compose local build failed

Dear Altruist,

We were trying to set up openFN Lightning on our local server using Docker, We were following the instructions from Run via Docker
We were getting a build failure after running the following Docker command,

docker compose build && docker compose run --rm web mix ecto.migrate

Error Details:
=> ERROR [web 15/20] RUN mix lightning.install_runtime 10.4s ------ > [web 15/20] RUN mix lightning.install_runtime: 0.867 Compiling 391 files (.ex) 9.579 9.579 == Compilation error in file lib/lightning_web/live/job_live/job_builder_components.ex == 9.579 ** (React.CompileError) lib/lightning_web/live/job_live/job_builder_components.ex:13: 9.579 error: could not read template "assets/js/job-editor/JobEditor.tsx": no such file or directory. Trying to read file "/app/assets/js/job-editor/JobEditor.tsx". 9,579 9,579 expanding macro: React.jsx/1 9,579 lib/lightning_web/live/job_live/job_builder_components.ex:13: LightningWeb.JobLive.JobBuilderComponents (module) ------ WARN[0000] current commit information was not captured by the build error="failed to read current commit information with git rev-parse --is-inside-work-tree" failed to solve: process "/bin/sh -c mix lightning.install_runtime" did not complete successfully: exit code: 1

We think the problem was in Dockerfile-dev

The assets were not copied before
Run mix compile/install,
We took the line 65 before line 56 that solved our issue.

2 Likes

Thanks @sohel ! Will you please raise a PR with the change you made that solved your problem? The community relies on contributors like you to make OpenFn great :slight_smile:

Thank you @taylordowns2000, here we have created a PR with the small changes that solved our local Docker build issue.

1 Like

Thank you @sohel ! You are a star! :star_struck:

We will take a look shortly!