Files
EventHubBack/docker/ObserverWeb.Dockerfile
T
2026-07-10 16:16:54 +03:00

30 lines
919 B
Docker

FROM erlang:28-alpine
RUN for i in 1 2 3 4 5; do \
apk add --no-cache elixir nodejs npm git inotify-tools && break; \
echo "apk retry $i/5..."; sleep 15; \
done
WORKDIR /app
RUN git clone --depth 1 https://github.com/thiagoesteves/observer_web.git .
RUN mix local.hex --force && mix local.rebar --force && mix deps.get
COPY docker/observer_web/build-assets.config.exs config/build-assets.config.exs
RUN printf '\nimport_config "build-assets.config.exs"\n' >> config/config.exs
RUN mkdir -p priv/static && \
touch priv/static/app.css && touch priv/static/app.js && \
cd assets && \
npm install && \
npm install --save-dev tailwindcss@4.1.0 @tailwindcss/cli @tailwindcss/forms esbuild@0.17.11 && \
cd .. && \
mix assets.build
COPY docker/observer_web/dev.exs .
EXPOSE 4000
CMD elixir --sname observer_web@observer_web --cookie eventhub_cookie -S mix run --no-halt dev.exs