FROM node:20-alpine as build ARG env_target ARG release_version WORKDIR /app COPY . /app/ COPY env/$env_target /app/.env RUN echo -e "\n" >> /app/.env RUN echo -e "APP_VERSION=${release_version}" >> /app/.env RUN yarn install RUN yarn build FROM nginx:1.16.0-alpine COPY --from=build /app/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]