diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..2536746a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,15 @@ +# 요약 \* + + + +It closes #issue_number + +# 스크린샷 + + + +# 이후 Task \* + + + +- 없음 diff --git a/docker-compose.yml b/docker-compose.yml index a3f89387..32f0e0ce 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: "3.4" +version: "3.9" name: "biseo" services: @@ -28,7 +28,8 @@ services: context: . dockerfile: .docker/api.Dockerfile depends_on: - - db + db: + condition: service_healthy networks: - frontend - backend @@ -44,6 +45,11 @@ services: command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci networks: - backend + healthcheck: + test: "mysql -uroot -p$$MYSQL_ROOT_PASSWORD $$MYSQL_DATABASE -e 'select 1'" + start_period: 0s + interval: 1s + retries: 3 volumes: biseo-data: diff --git a/packages/api/docker-compose.dev.yml b/packages/api/docker-compose.dev.yml index e7558a9c..a9361e0b 100644 --- a/packages/api/docker-compose.dev.yml +++ b/packages/api/docker-compose.dev.yml @@ -12,6 +12,11 @@ services: volumes: - db:/var/lib/mysql command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci + healthcheck: + test: "mysql -uroot -p$$MYSQL_ROOT_PASSWORD $$MYSQL_DATABASE -e 'select 1'" + start_period: 0s + interval: 1s + retries: 30 volumes: db: diff --git a/packages/api/package.json b/packages/api/package.json index 08f23349..782704f4 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -4,13 +4,13 @@ "main": "src/index.ts", "license": "MIT", "scripts": { - "dev": "pnpm migrate && nodemon", + "dev": "pnpm migrate:dev && nodemon", "prod": "prisma migrate deploy && node dist/index.js", "db": "docker compose -f docker-compose.dev.yml", "typecheck": "prisma generate && tsc --noEmit", "typegen": "prisma generate", - "migrate": "pnpm db up -d && prisma migrate dev", - "studio": "pnpm db up -d && prisma studio", + "migrate:dev": "pnpm db up --wait && prisma migrate dev", + "studio": "pnpm db up --wait && prisma studio", "build": "prisma generate && tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json", "env": "echo $NODE_ENV" }, diff --git a/packages/api/src/lib/error.ts b/packages/api/src/lib/error.ts index 39d7317a..bbbc0fee 100644 --- a/packages/api/src/lib/error.ts +++ b/packages/api/src/lib/error.ts @@ -2,6 +2,11 @@ import type { Error as ErrorResponse } from "@biseo/interface/helpers"; import logger from "@biseo/api/utils/logger"; export class BiseoError extends Error { + constructor(message: string) { + super(message); + Object.setPrototypeOf(this, BiseoError.prototype); + } + serialize() { return { ok: false, message: this.message } as const; } diff --git a/packages/web/src/components/atoms/Button.tsx b/packages/web/src/components/atoms/Button.tsx index 3d478861..c48b4cbb 100644 --- a/packages/web/src/components/atoms/Button.tsx +++ b/packages/web/src/components/atoms/Button.tsx @@ -33,6 +33,7 @@ export const Button = styled.button<{ &:disabled { cursor: not-allowed; + background-color: ${theme.colors.gray100}; } `, ); diff --git a/packages/web/src/components/atoms/Card.tsx b/packages/web/src/components/atoms/Card.tsx index 01ffb38b..5b93c53d 100644 --- a/packages/web/src/components/atoms/Card.tsx +++ b/packages/web/src/components/atoms/Card.tsx @@ -25,7 +25,7 @@ export const Card = styled.div<{ background-color: ${primary ? theme.colors.blue100 : theme.colors.white}; border: 1px solid ${(() => { - if (bold) return primary ? theme.colors.blue600 : theme.colors.gray500; + if (bold) return primary ? theme.colors.blue600 : theme.colors.gray400; return primary ? theme.colors.blue300 : theme.colors.gray300; })()}; padding: ${small ? `12px 15px` : `18px 20px`}; diff --git a/packages/web/src/components/atoms/Label.tsx b/packages/web/src/components/atoms/Label.tsx index c800b542..f3ab9019 100644 --- a/packages/web/src/components/atoms/Label.tsx +++ b/packages/web/src/components/atoms/Label.tsx @@ -17,7 +17,7 @@ export const Select = styled.select<{ w: number; h: number }>` border: 1px solid ${props => props.theme.colors.gray200}; background-color: ${props => props.theme.colors.white}; - font-family: "Noto Sansf KR"; + font-family: "Noto Sans KR"; font-size: 10px; font-style: normal; font-weight: 500; diff --git a/packages/web/src/components/atoms/SelectBox.tsx b/packages/web/src/components/atoms/SelectBox.tsx index 4af10efc..3d8cd81f 100644 --- a/packages/web/src/components/atoms/SelectBox.tsx +++ b/packages/web/src/components/atoms/SelectBox.tsx @@ -21,7 +21,7 @@ export const SelectBox: React.FC = ({ onChange={e => onChange(e.target.value)} defaultValue="" > - + {options.map(option => (