esameits24-26frontend/dockerfile/Dockerfile
AV77web 3e1f6743c6
All checks were successful
Deploy to VPS / build (push) Successful in 19s
Deploy to VPS / deploy (push) Successful in 16s
primo commit
2026-07-12 22:55:42 +02:00

21 lines
448 B
Docker

# syntax=docker/dockerfile:1
ARG NODE_VERSION=20
FROM node:${NODE_VERSION}-alpine AS build
WORKDIR /app
ARG VITE_API_URL=https://esameits24-26backend.andreavillari.it
ENV VITE_API_URL=$VITE_API_URL
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:alpine AS runtime
COPY dockerfile/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 3010
CMD ["nginx", "-g", "daemon off;"]