

# build environment
FROM node:14.15.1 as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json /app/package.json
RUN npm install

COPY . /app

RUN npm run build-storybook

CMD ["npm", "run", "serve"]

# # production environment
# FROM nginx:1.16.0-alpine
# COPY --from=storybook-static /app/storybook-static /usr/share/nginx/html
# RUN rm /etc/nginx/conf.d/default.conf
# COPY nginx/nginx.conf /etc/nginx/conf.d
# EXPOSE 80
# CMD ["nginx", "-g", "daemon off;"]
