docker compose

This commit is contained in:
Thomas 2025-03-18 16:56:00 +01:00
parent bc37b5551c
commit b04e30c98e
3 changed files with 22 additions and 1 deletions

11
compose.yml Normal file
View File

@ -0,0 +1,11 @@
services:
storybook:
build: .
ports:
- "6006:6006"
volumes:
- .:/app
- /app/node_modules
environment:
- NODE_ENV=production
command: npm run storybook

10
dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM node:lts-alpine as build
WORKDIR /app
COPY package.json ./
COPY package-lock.json ./
RUN npm install
COPY . .
EXPOSE 6006
CMD ["npm", "run", "storybook", "--", "--no-open"]

View File

@ -23,7 +23,7 @@
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"storybook": "storybook dev -p 6006",
"storybook": "storybook dev -p 6006 --no-open",
"build-storybook": "storybook build"
},
"keywords": [],