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"]