FROM node:20.9.0-bullseye-slim as build-stage WORKDIR /app COPY package*.json ./ RUN npm install COPY ./ . RUN npm run build FROM nginx:stable-alpine3.17-slim as production-stage RUN mkdir /app RUN apk add --no-cache tzdata ENV TZ Europe/Warsaw COPY --from=build-stage /app/dist /usr/share/nginx/html COPY ./nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 EXPOSE 443 FROM node:20.9.0-bullseye-slim as dev WORKDIR /app COPY package*.json ./ RUN npm install ENV HOST=0.0.0.0 COPY . . EXPOSE 8080 CMD ["npm", "run", "dev"]