From 1cd773cc6f8b190b76c7652d6a360f54fbb164ac Mon Sep 17 00:00:00 2001 From: KKlochko Date: Tue, 22 Apr 2025 11:40:54 +0300 Subject: [PATCH] Update the mix and docker image configuration to install js assets. --- Dockerfile | 2 +- mix.exs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7452278..aad73b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}" FROM ${BUILDER_IMAGE} as builder # install build dependencies -RUN apt-get update -y && apt-get install -y build-essential git \ +RUN apt-get update -y && apt-get install -y build-essential git nodejs npm \ && apt-get clean && rm -f /var/lib/apt/lists/*_* # prepare build dir diff --git a/mix.exs b/mix.exs index d24b0e4..21712d9 100644 --- a/mix.exs +++ b/mix.exs @@ -86,9 +86,13 @@ defmodule DecentralisedBookIndex.MixProject do "ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"], "ecto.reset": ["ecto.drop", "ecto.setup"], test: ["ash.setup --quiet", "test"], - "assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"], + "assets.setup": [ + "tailwind.install --if-missing", + "esbuild.install --if-missing" + ], "assets.build": ["tailwind decentralised_book_index", "esbuild decentralised_book_index"], "assets.deploy": [ + "cmd --cd assets npm install", "tailwind decentralised_book_index --minify", "esbuild decentralised_book_index --minify", "phx.digest"