Files
GenExam-IA/frontend/Dockerfile
T
Mireya Cueto Garrido 91999e7691 Update runtime ports and deployment defaults.
Switch backend/frontend to ports 8074/8075 and align Docker, CORS, frontend API base URL, and docs so deployment uses the new endpoints consistently.
2026-06-02 10:09:49 +02:00

21 lines
492 B
Docker

# --- Build stage ---
FROM node:20-alpine AS build
WORKDIR /app
ARG VITE_API_URL=http://localhost:8074
ARG VITE_GOOGLE_CLIENT_ID=
ENV VITE_API_URL=$VITE_API_URL
ENV VITE_GOOGLE_CLIENT_ID=$VITE_GOOGLE_CLIENT_ID
COPY package.json package-lock.json* ./
RUN npm install
COPY . .
RUN npm run build
# --- Serve stage ---
FROM nginx:1.27-alpine AS serve
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]