26 lines
800 B
Text
26 lines
800 B
Text
# ==============================================================================
|
|
# TheCr3w Admin Panel — Dockerfile (React + Vite -> Nginx Alpine)
|
|
# ==============================================================================
|
|
|
|
FROM node:22-alpine AS build
|
|
WORKDIR /app
|
|
|
|
COPY frontend/admin-panel/package.json ./
|
|
RUN npm install
|
|
|
|
COPY frontend/admin-panel/ ./
|
|
RUN npm run build
|
|
|
|
# ------------------------------------------------------------------------------
|
|
# Production Nginx Runtime
|
|
# ------------------------------------------------------------------------------
|
|
FROM nginx:alpine AS runtime
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
|
|
EXPOSE 80
|
|
|
|
HEALTHCHECK --interval=10s --timeout=3s --retries=3 \
|
|
CMD wget -qO- http://localhost:80/ || exit 1
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|
|
|