altricade_portofolio/Dockerfile
Заид Омар Медхат | Zaid Omar Medhat fab8983d5c
Some checks failed
Deploy / deploy (push) Failing after 5m27s
init
2026-07-09 12:21:21 +05:00

17 lines
513 B
Docker

# ---- Build stage: compile the Vite/React app into static files ----
FROM node:22-bookworm AS build
WORKDIR /app
# Install dependencies from the lockfile (reproducible)
COPY package.json package-lock.json ./
RUN npm ci
# Copy the rest of the source and build (outputs to /app/dist)
COPY . .
RUN npm run build
# ---- Serve stage: tiny nginx image that serves the built files ----
FROM nginx:1.27-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80