Skip to content

Clarify ordering in Dockerfile for Fly deployments #766

@APB9785

Description

@APB9785

If the step

RUN mix esbuild.install --if-missing

comes before

RUN mix assets.deploy

then the app can fail to boot with an error like:

2025-02-14T18:37:34Z app[17815ee1c522d8] lhr [info]** (Beacon.LoaderError) esbuild binary not found or the installation is invalid.
2025-02-14T18:37:34Z app[17815ee1c522d8] lhr [info]Execute the following command to install the binary used to process JS:
2025-02-14T18:37:34Z app[17815ee1c522d8] lhr [info]    mix esbuild.install
2025-02-14T18:37:34Z app[17815ee1c522d8] lhr [info]    (beacon 0.4.0) lib/beacon/runtime_js.ex:188: Beacon.RuntimeJS.validate_esbuild_install!/0
2025-02-14T18:37:34Z app[17815ee1c522d8] lhr [info]    (beacon 0.4.0) lib/beacon/runtime_js.ex:13: Beacon.RuntimeJS.build/1
2025-02-14T18:37:34Z app[17815ee1c522d8] lhr [info]    (beacon 0.4.0) lib/beacon/runtime_js.ex:128: Beacon.RuntimeJS.load!/1
2025-02-14T18:37:34Z app[17815ee1c522d8] lhr [info]    (beacon 0.4.0) lib/beacon/loader/worker.ex:397: Beacon.Loader.Worker.handle_call/3
2025-02-14T18:37:34Z app[17815ee1c522d8] lhr [info]    (stdlib 6.2) gen_server.erl:2381: :gen_server.try_handle_call/4
2025-02-14T18:37:34Z app[17815ee1c522d8] lhr [info]    (stdlib 6.2) gen_server.erl:2410: :gen_server.handle_msg/6
2025-02-14T18:37:34Z app[17815ee1c522d8] lhr [info]    (stdlib 6.2) proc_lib.erl:329: :proc_lib.init_p_do_apply/3

We mention that the step should be after RUN mix release but it should also clarify that it should also be after RUN mix assets.deploy

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions