diff --git a/.gitignore b/.gitignore index 3c3629e..eff5dde 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +storybook-static \ No newline at end of file diff --git a/dockerfile b/dockerfile index 5eca380..9351b2d 100644 --- a/dockerfile +++ b/dockerfile @@ -1,10 +1,16 @@ FROM node:lts-alpine as build WORKDIR /app -COPY package.json ./ -COPY package-lock.json ./ +COPY package*.json ./ RUN npm install COPY . . -EXPOSE 6006 -CMD ["npm", "run", "storybook", "--", "--no-open"] +RUN npm run build-storybook +FROM node:lts-alpine as main +RUN npm i -g http-server +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY --from=build /app/storybook-static /app/storybook-static +EXPOSE 6006 +CMD [ "http-server", "/app/storybook-static" ] \ No newline at end of file