From fdd726753bdc55b315d96f0e6cd603fad45c6a6c Mon Sep 17 00:00:00 2001 From: fcarraUniSa Date: Wed, 18 Feb 2026 13:56:46 +0100 Subject: [PATCH] Update Dockerfile --- backend/Dockerfile | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index d63cad7..b3ca787 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,24 +1,20 @@ -# Build Stage -FROM node:20-alpine AS build +FROM node:20-alpine -# Install dependencies for native modules if needed +# Install dependencies for native modules RUN apk add --no-cache python3 make g++ WORKDIR /app COPY package.json ./ -# Install dependencies without lockfile to avoid conflicts +# Install dependencies RUN npm install COPY . . -# Build the app -RUN npm run build +# Ensure uploads directory exists +RUN mkdir -p uploads -# Production Stage -FROM nginx:alpine -COPY nginx.conf /etc/nginx/conf.d/default.conf -COPY --from=build /app/dist /usr/share/nginx/html -EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] +EXPOSE 3000 + +CMD ["npm", "start"]