provapraticafrontend/dockerfile/Dockerfile
AV77web 722eae8a98
Some checks failed
Deploy to VPS / build (push) Successful in 19s
Deploy to VPS / deploy (push) Failing after 2s
primo commit
2026-06-09 12:25:37 +02:00

21 lines
447 B
Docker

# syntax=docker/dockerfile:1
ARG NODE_VERSION=20
FROM node:${NODE_VERSION}-alpine AS build
WORKDIR /app
ARG VITE_API_URL=https://provapraticabackend.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 3002
CMD ["nginx", "-g", "daemon off;"]