# FROM node:erbium
# pull the base image
# FROM node:alpine
FROM node:22-alpine

# Build args
ARG NODE_ENV

ENV NODE_VERSION 14.19.0
ENV NODE_ENV=$NODE_ENV

# install nginx
RUN apk update
RUN apk add nginx

WORKDIR /app

COPY nginx.conf ./

COPY run.sh ./

COPY package.json .

RUN npm install

COPY . .

#RUN npm run build

RUN npm run start
# CMD [ "npm", "run", "preview" ]
##CMD [ "npm", "run", "start" ,"--", "--host"]

#CMD /bin/sh ./run.sh

