Skip to content

Commit 9eedb01

Browse files
committed
storybook update try
1 parent 46e6440 commit 9eedb01

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

client/Dockerfile.storybook

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1+
# ---- Build static Storybook ----
12
FROM node:20-alpine AS build
23
WORKDIR /app
34

4-
COPY client/package.json client/package-lock.json* client/yarn.lock* client/pnpm-lock.yaml* ./client/
5+
COPY client/package.json client/package-lock.json* ./client/
56
WORKDIR /app/client
67

78
RUN npm ci
89

9-
COPY client/ /app/client/
10+
COPY client/ .
1011

1112
RUN npm run build-storybook
1213

14+
# ---- Serve with nginx ----
1315
FROM nginx:alpine
1416
COPY --from=build /app/client/storybook-static /usr/share/nginx/html
1517

16-
RUN printf 'server { listen 80; server_name _; root /usr/share/nginx/html; index index.html; location / { try_files $uri $uri/ /index.html; } }' > /etc/nginx/conf.d/default.conf
18+
RUN printf 'server {\n\
19+
listen 80;\n\
20+
server_name _;\n\
21+
root /usr/share/nginx/html;\n\
22+
index index.html;\n\
23+
location / {\n\
24+
try_files $uri $uri/ /index.html;\n\
25+
}\n\
26+
}\n' > /etc/nginx/conf.d/default.conf
1727

1828
EXPOSE 80

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"test:e2e:headed": "npx playwright test --headed",
2828
"test:e2e:interactive": "npx playwright codegen http://localhost:8082",
2929
"test:e2e:chromium": "npx playwright test --project=chromium --headed",
30-
"build-storybook": "storybook build --output-dir storybook-static --static-dir public --docs --base-path /storybook/"
30+
"build-storybook": "storybook build"
3131
},
3232
"lint-staged": {
3333
"*.{vue,js,jsx,ts,tsx}": [

0 commit comments

Comments
 (0)