deploy
Some checks failed
Build & Deploy MB Grid Solutions / build-and-deploy (push) Failing after 24s
Some checks failed
Build & Deploy MB Grid Solutions / build-and-deploy (push) Failing after 24s
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -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