-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1316 from IntersectMBO/feat/deploy-storybook
Setup deployment of storybook
- Loading branch information
Showing
3 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM node:18-alpine as deps | ||
ARG NPMRC_TOKEN | ||
|
||
WORKDIR /src | ||
|
||
# Set npm configuration settings using environment variables | ||
RUN npm config set @intersect.mbo:registry "https://registry.npmjs.org/" --location=global \ | ||
&& npm config set //registry.npmjs.org/:_authToken ${NPMRC_TOKEN} --location=global | ||
|
||
COPY package.json package-lock.json ./ | ||
RUN npm install | ||
|
||
FROM node:18-alpine as builder | ||
ARG NPMRC_TOKEN | ||
ENV NODE_OPTIONS=--max_old_space_size=8192 | ||
WORKDIR /src | ||
|
||
COPY --from=deps /src/node_modules ./node_modules | ||
COPY . . | ||
|
||
RUN npm run build-storybook --quiet | ||
|
||
FROM nginx:stable-alpine | ||
EXPOSE 80 | ||
|
||
COPY --from=builder /src/storybook-static /usr/share/nginx/html | ||
|
||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters