This commit is contained in:
+7
-9
@@ -8,22 +8,20 @@ RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
# Build Frontend
|
||||
RUN npm run build:frontend
|
||||
|
||||
# Build Backend
|
||||
RUN npm run build:backend
|
||||
# Build Application
|
||||
RUN npm run build
|
||||
|
||||
# Runtime Stage
|
||||
FROM node:20-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy necessary files for production
|
||||
COPY --from=build /app/package*.json ./
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/.next ./.next
|
||||
COPY --from=build /app/public ./public
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "dist/backend/server.js"]
|
||||
CMD ["npm", "start"]
|
||||
|
||||
Reference in New Issue
Block a user