Skip to content

Commit

Permalink
Merge pull request #776 from NUTFes/intro-storybook-main
Browse files Browse the repository at this point in the history
試作Stories.tsxファイルの追加
  • Loading branch information
Kubosaka authored Jun 12, 2024
2 parents a46b8a2 + 74c5be5 commit 96d3228
Show file tree
Hide file tree
Showing 38 changed files with 29,565 additions and 7,511 deletions.
1 change: 0 additions & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
cloudflare:
image: "cloudflare/cloudflared:latest"
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "3"
services:
db:
image: mysql:8.0
Expand All @@ -24,6 +23,7 @@ services:
command: sh -c "npm install && npm run dev"
ports:
- "3000:3000"
- "6006:6006"
stdin_open: true
environment:
NEXT_PUBLIC_ENDPOINT: minio
Expand Down
6 changes: 3 additions & 3 deletions prod.view.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Build用 コンテナ
FROM node:16.13.0 AS builder
FROM node:20.14 AS builder
WORKDIR /app/next-project
COPY ./view/next-project /app/next-project
RUN npm install
RUN npm run build

# 本番用 軽量 nodejs16
FROM gcr.io/distroless/nodejs16-debian11:nonroot
# 本番用 軽量 nodejs20.14
FROM node:20.14-slim
WORKDIR /app
LABEL org.opencontainers.image.source="https://github.com/NUTFes/FinanSu"
ENV NODE_ENV production
Expand Down
2 changes: 1 addition & 1 deletion view/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ベースイメージの作成
FROM node:16.13.0
FROM node:20.14
# コンテナ内で作業するディレクトリを指定
WORKDIR /app/next-project
COPY ./ /app
Expand Down
8 changes: 6 additions & 2 deletions view/next-project/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:import/errors"
"plugin:import/errors",
"plugin:storybook/recommended"
],
"plugins": ["@typescript-eslint", "unused-imports", "import"],
"parser": "@typescript-eslint/parser",
"env": { "node": true, "es6": true },
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
Expand Down
22 changes: 22 additions & 0 deletions view/next-project/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import type { StorybookConfig } from '@storybook/nextjs';

const config: StorybookConfig = {
stories: [
'../src/**/*.mdx',
'../src/**/*.stories.@(js|jsx|mjs|ts|tsx)',
'../src/components/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/nextjs',
options: {},
},
staticDirs: ['../public'],
};
export default config;
15 changes: 15 additions & 0 deletions view/next-project/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { Preview } from '@storybook/react';
import '../src/styles/globals.css';

const preview: Preview = {
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
Loading

0 comments on commit 96d3228

Please sign in to comment.