Commit 41f45d5e authored by Mahmoud Aglan's avatar Mahmoud Aglan

fixedDocker

parent e7ac6b83
......@@ -4,10 +4,22 @@
FROM node:20-alpine AS frontend-build
WORKDIR /build/frontend
COPY frontend/package.json frontend/package-lock.json* ./
RUN npm install --legacy-peer-deps
# Copy everything so lockfile, configs (vite, tailwind, postcss) are all present
COPY frontend/ ./
RUN npm run build
# Install deps: use ci if lockfile exists, otherwise install and generate one
RUN if [ -f package-lock.json ]; then \
echo "📦 Found package-lock.json — running npm ci" && \
npm ci --legacy-peer-deps; \
else \
echo "⚠️ No package-lock.json — running npm install" && \
npm install --legacy-peer-deps; \
fi && \
npm cache clean --force
# Build production bundle
RUN NODE_ENV=production npm run build
# ============================================
# Stage 2: Python Backend + Serve Frontend
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment