Files
radiusNucleo/node-api/Dockerfile
josedario87 984279e756
All checks were successful
build-and-deploy / build (push) Successful in 13s
build-and-deploy / deploy (push) Successful in 16s
fix
2025-09-26 20:29:03 -06:00

21 lines
409 B
Docker

FROM node:20-alpine AS frontend
WORKDIR /frontend
COPY ../frontend/package*.json ./
RUN npm ci || npm i
COPY ../frontend/ .
RUN npm run build
FROM node:20-alpine
WORKDIR /app
ENV NODE_ENV=production
COPY package*.json ./
RUN npm ci --only=production || npm i --only=production
COPY . .
# Overwrite static with built SPA
COPY --from=frontend /frontend/dist /app/public
EXPOSE 3000
CMD ["node", "index.js"]