chore: update build

This commit is contained in:
Rafael Taranto 2025-03-08 12:32:03 +00:00
parent 2e31ab391f
commit b11c23c346
3 changed files with 4 additions and 84 deletions

View file

@ -1,33 +0,0 @@
FROM ubuntu:20.04 as base
ARG VERSION
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Lisbon
RUN apt-get update
RUN apt-get install -y -q curl \
sudo \
git \
python2-minimal \
build-essential \
libpq-dev \
net-tools \
tar
RUN curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
RUN apt-get install nodejs -y -q
WORKDIR lamassu-server
COPY ["package.json", "package-lock.json", "./"]
RUN npm version --allow-same-version --git-tag-version false --commit-hooks false 1.0.0
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
RUN cd .. && tar -zcvf lamassu-server.tar.gz ./lamassu-server

View file

@ -1,5 +1,5 @@
FROM alpine:3.14 AS build
RUN apk add --no-cache nodejs npm git curl build-base net-tools python3 postgresql-dev
FROM node:22-alpine AS build
RUN apk add --no-cache npm git curl build-base net-tools python3 postgresql-dev
WORKDIR lamassu-server
@ -10,8 +10,8 @@ RUN npm install --production
COPY . ./
FROM alpine:3.14 AS l-s-base
RUN apk add --no-cache nodejs npm git curl bash libpq openssl ca-certificates
FROM node:22-alpine AS l-s-base
RUN apk add --no-cache npm git curl bash libpq openssl ca-certificates
COPY --from=build /lamassu-server /lamassu-server