Glimesh / glimesh.tv

Glimesh is a next generation live streaming platform built by the community, for the community.
https://glimesh.tv
Other
465 stars 77 forks source link

docker erlexec not found #824

Closed iznotek closed 1 year ago

iznotek commented 2 years ago

hye, trying to simply build docker prod image i got the following error at run time: /app/releases/0.1.0/../../erts-12.2/bin/erl: exec: line 12: /app/erts-12.2/bin/erlexec: not found any idea ? or mistake i made ?

just an simple: dpcker build -t myorg/glimesh:latest . then update the docker-compose prod with a db, adapting env and image name with the one built. thanks all

clone1018 commented 2 years ago

Sorry about that, can you try switching to this branch and seeing if it works for you? https://github.com/Glimesh/glimesh.tv/pull/826

iznotek commented 2 years ago

thanks, i made few change

librsvg2-bin instead of librsvg nobody:nogroup instead of nobody:nobody

also i tried to adapt it to ecto.setup for the database before start but i still have pb for now... is there a formal way to ecto.setup the db by docker ?

FROM elixir:1.13.4-slim AS app
RUN apt-get update
RUN apt-get install -y --no-install-recommends libssl-dev libncurses-dev ca-certificates imagemagick librsvg2-bin npm

RUN npm install -g svgo

WORKDIR /app
RUN mix local.hex --force && \
    mix local.rebar --force

RUN chown nobody:nogroup /app
USER nobody:nogroup

COPY --from=build --chown=nobody:nogroup /app/_build/prod/rel/glimesh ./
COPY --from=build --chown=nobody:nogroup /app/priv ./priv
COPY --from=build --chown=nobody:nogroup /app/config ./config
COPY --from=build --chown=nobody:nogroup /app/mix.exs ./mix.exs
COPY --from=build --chown=nobody:nogroup /app/mix.lock ./mix.lock

ENV HOME=/app

RUN ls /app
RUN ls /app/erts-12.3.1/bin/

CMD ["sh", "-c", "mix ecto.setup && bin/glimesh start"]

and i get at run time:

(Mix) Could not find an SCM for dependency :phoenix_live_reload from Glimesh.MixProject
Shall I install Hex? (if running non-interactively, use "mix local.hex --force") [Yn]
clone1018 commented 2 years ago

I don't use Docker locally usually, I'll work on getting the build working and then push my changes up!

clone1018 commented 2 years ago

Okay, I've got the working Dockerfile pushed to the main dev branch. I also ran docker-compose up per the docs and that creates the DB and sets everything up for you. Let me know if that works!

clone1018 commented 1 year ago

We use docker for our production deploys now, so please let me know if this isn't working for you by creating a new issue.