From 2053a3c55c3e6f3f6280048d31561917044c320d Mon Sep 17 00:00:00 2001 From: Vamsi Krishna B Date: Fri, 20 Aug 2021 20:18:06 +0530 Subject: [PATCH] Fixed CSS issue on Docker build , Bump Tailwind Version --- Dockerfile | 26 +++++++++++++------------- assets/package.json | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 91ddd25..2f89427 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM elixir:1.12.1-alpine AS build +FROM elixir:1.12.2-alpine AS build # install build dependencies RUN apk add --update --no-cache build-base --update nodejs npm git @@ -13,28 +13,28 @@ RUN mix local.hex --force && \ # set build ENV ENV MIX_ENV=prod -# install mix dependencies + COPY mix.exs mix.lock ./ COPY config config RUN mix do deps.get, deps.compile -# build assets -COPY assets/package.json assets/package-lock.json ./assets/ -RUN npm --prefix ./assets ci --progress=false --no-audit --loglevel=error +COPY assets/package.json ./assets/ +RUN npm install --prefix=assets + +# should be before running npm deploy +COPY lib lib +copy rel rel COPY priv priv COPY assets assets -RUN npm run --prefix ./assets deploy -RUN mix phx.digest +RUN npm run deploy --prefix=assets -# compile and build release -COPY lib lib -COPY rel rel -RUN mix do compile, release +RUN mix phx.digest +RUN mix do release # prepare release image FROM alpine:3.14 AS app -RUN apk add --no-cache openssl ncurses-libs +RUN apk add --no-cache openssl ncurses-libs libstdc++ libgcc WORKDIR /app @@ -46,4 +46,4 @@ COPY --from=build --chown=nobody:nobody /app/_build/prod/rel/zcash_explorer ./ ENV HOME=/app -CMD ["bin/zcash_explorer", "start"] \ No newline at end of file +CMD ["bin/zcash_explorer", "start"] diff --git a/assets/package.json b/assets/package.json index 41b7127..424735f 100644 --- a/assets/package.json +++ b/assets/package.json @@ -29,7 +29,7 @@ "postcss": "^8.2.8", "postcss-loader": "^4.2.0", "sass-loader": "^8.0.2", - "tailwindcss": "^2.0.4", + "tailwindcss": "^2.2.7", "terser-webpack-plugin": "^2.3.2", "webpack": "^4.41.5", "webpack-cli": "^3.3.2"