Fix observer-web build: use npm tailwind/esbuild instead of GitHub download.
CI / test (push) Successful in 18m45s
CI / test (push) Successful in 18m45s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,19 +7,23 @@ RUN for i in 1 2 3 4 5; do \
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN git clone https://github.com/thiagoesteves/observer_web.git .
|
||||
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 && cd .. && \
|
||||
cd assets && \
|
||||
npm install && \
|
||||
npm install --save-dev tailwindcss@4.1.0 @tailwindcss/cli @tailwindcss/forms esbuild@0.17.11 && \
|
||||
cd .. && \
|
||||
mix assets.build
|
||||
|
||||
# Копируем наш dev.exs с автоподключением к нодам EventHub
|
||||
COPY docker/observer_web/dev.exs .
|
||||
|
||||
EXPOSE 4000
|
||||
|
||||
# Только запуск сервера, без ручного Node.connect
|
||||
CMD elixir --sname observer_web@observer_web --cookie eventhub_cookie -S mix run --no-halt dev.exs
|
||||
@@ -0,0 +1,10 @@
|
||||
# Docker build: tailwind/esbuild из npm (без download с GitHub releases).
|
||||
import Config
|
||||
|
||||
config :esbuild,
|
||||
version_check: false,
|
||||
path: Path.expand("../assets/node_modules/esbuild/bin/esbuild", __DIR__)
|
||||
|
||||
config :tailwind,
|
||||
version_check: false,
|
||||
path: Path.expand("../assets/node_modules/.bin/tailwindcss", __DIR__)
|
||||
Reference in New Issue
Block a user