Example
Some checks failed
Build and Publish / build (push) Failing after 5s

This commit is contained in:
2025-12-31 17:44:38 +01:00
parent ddd325cc47
commit f0d839435f
3 changed files with 47 additions and 0 deletions

20
Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# Build stage
FROM node:18-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Artifacts stage (per estrarre i build artifacts)
FROM build AS artifacts
RUN mkdir -p /out/dist && cp -r dist/* /out/dist/
# Production stage
FROM node:18-alpine AS production
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=build /app/package*.json ./
RUN npm install --production
EXPOSE 3000
CMD ["node", "dist/index.js"]