From c85f2c8902d2d08de426e46f6a55f111ea37b8f2 Mon Sep 17 00:00:00 2001 From: Rafael Taranto Date: Wed, 16 Apr 2025 15:31:30 +0100 Subject: [PATCH] fix: build process for ui --- build/ci.Dockerfile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/build/ci.Dockerfile b/build/ci.Dockerfile index 8eeaf0a6..21e77319 100644 --- a/build/ci.Dockerfile +++ b/build/ci.Dockerfile @@ -1,3 +1,14 @@ +FROM node:22-alpine AS build-ui +RUN apk add --no-cache npm git curl build-base python3 + +COPY ["new-lamassu-admin/package.json", "new-lamassu-admin/package-lock.json", "./"] + +RUN npm version --allow-same-version --git-tag-version false --commit-hooks false 1.0.0 +RUN npm install + +COPY new-lamassu-admin/ ./ +RUN npm run build + FROM ubuntu:20.04 as base ARG VERSION @@ -25,9 +36,6 @@ RUN npm version --allow-same-version --git-tag-version false --commit-hooks fals RUN npm install --production COPY . ./ - -RUN cd new-lamassu-admin && npm install && npm run build -RUN mv new-lamassu-admin/build public/ -RUN rm -rf new-lamassu-admin/node_modules +COPY --from=build-ui /build /lamassu-server/public RUN cd .. && tar -zcvf lamassu-server.tar.gz ./lamassu-server