Skip to content

Error loading assets on a mix release #30

@maukbe

Description

@maukbe

I have added the error_tracker_dashboard at /errors in router. This works fine when run locally using an iex shell.

Deploying the app to Fly IO it will fail to load the page with the error:

Request: GET /errors

[info] ** (exit) an exception was raised:

[info] ** (File.Error) could not read file "/app/_build/prod/lib/error_tracker/priv/static/app.css": no such file or directory

Some possibly useful snippets from the Dockerfile used to generate the image being ran:

RUN cd assets && npm install 

COPY package.json package.json
RUN npm install

# compile assets
RUN mix assets.deploy

# Compile the release
RUN mix compile

# Changes to config/runtime.exs don't require recompiling the code
COPY config/runtime.exs config/

COPY rel rel
RUN mix release

...

# Only copy the final release from the build stage
COPY --from=builder --chown=nobody:root /app/_build/${MIX_ENV}/rel/app_name ./

USER nobody

# If using an environment that doesn't automatically reap zombie processes, it is
# advised to add an init process such as tini via `apt-get install`
# above and adding an entrypoint. See https://github.com/krallin/tini for details
# ENTRYPOINT ["/tini", "--"]

CMD ["/app/bin/server"]

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions