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