FROM gitea.pena/penadevops/container-images/node:main as build

WORKDIR /usr/app
COPY . .


RUN npm install --force && yarn cache clean
RUN psstat.sh "npm run build"

FROM gitea.pena/penadevops/container-images/nginx:main as result
WORKDIR /usr/share/nginx/html
COPY --from=build /usr/app/build/ /usr/share/nginx/html
COPY hub.conf /etc/nginx/conf.d/default.conf
