-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- mysql에 저장하던 방식을 redis 와 mongoDB를 활용하여 분산하고, gateWay에서 collaborative…
… 서비스하나만 알 수 있게 의존성 분리, 브레드 크럼 구현 (#172) * chore: 브랜치 변경을 위한 작업 내용 저장 * feat: redis to mongodb * fix: 예시 코드 삭제 * chore: 작업중인 내용 저장 * fix: module dependency fix * fix: docker-compose * fix: loggerService * fix: dependency * chore: v2 버전 스위칭을 위한 주석 처리 * chore: v2 버전 스위칭을 위한 주석 처리 * feat: 작업 내용 저장을 위한 커밋 * feat: 작업 내용 저장용 커밋 * fix: yjsgate 로직 수정 반영 * fix: elk 삭제 * feat: breadcrum * feat: loggerservice delete * feat: loggerservice delete * fix: noteService * feat: breadcrumb 작업 및 spaceService, noteService MongoDB 변경 및 redisService 추가 * chore: controller 수정 * fix: api 반환값 수정 * fix: logger 메시지 수정 * fix: nginx * fix: nginx * fix: docker-compose * fix: note * fix: collaborative service
- Loading branch information
1 parent
88904fc
commit 705fff4
Showing
58 changed files
with
11,432 additions
and
6,709 deletions.
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,57 +1,37 @@ | ||
# 빌드 스테이지 | ||
FROM node:20-alpine AS builder | ||
|
||
# 작업 디렉터리 설정 | ||
WORKDIR /app | ||
|
||
# 필요한 빌드 도구 설치 | ||
RUN apk add --no-cache python3 make g++ && npm install -g pnpm | ||
|
||
# 루트 레벨의 패키지 파일들 복사 | ||
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./ | ||
|
||
# packages의 package.json 파일들 복사 | ||
COPY ./packages/backend ./packages/backend/ | ||
COPY ./packages/shared ./packages/shared/ | ||
|
||
# 의존성 설치 (husky 설치 건너뛰기) | ||
RUN HUSKY=0 pnpm install --no-frozen-lockfile | ||
|
||
# 소스 코드 복사 | ||
COPY ./packages/backend ./packages/backend | ||
COPY ./packages/shared ./packages/shared | ||
COPY ./tsconfig.json ./ | ||
|
||
# 백엔드 빌드 | ||
RUN cd ./packages/backend && pnpm build | ||
|
||
# 프로덕션 스테이지 | ||
FROM node:20-alpine AS production | ||
|
||
WORKDIR /app | ||
|
||
# 필요한 런타임 도구 설치 | ||
RUN npm install -g pnpm | ||
|
||
# 빌드 스테이지에서 필요한 파일들만 복사 | ||
COPY --from=builder /app/package.json /app/pnpm-workspace.yaml ./ | ||
COPY --from=builder /app/packages/backend/package.json ./packages/backend/ | ||
COPY --from=builder /app/packages/shared/package.json ./packages/shared/ | ||
|
||
# 프로덕션 의존성만 설치 (husky 설치 건너뛰기) | ||
RUN HUSKY=0 pnpm install --no-frozen-lockfile --prod --ignore-scripts | ||
|
||
# 빌드된 백엔드 파일들 복사 | ||
COPY --from=builder /app/packages/backend/dist ./packages/backend/dist | ||
|
||
# shared 패키지 소스 복사 | ||
COPY --from=builder /app/packages/shared ./packages/shared | ||
|
||
# 작업 디렉터리를 백엔드로 변경 | ||
WORKDIR /app/packages/backend | ||
|
||
# 포트 설정 | ||
EXPOSE 3000 | ||
|
||
# 애플리케이션 실행 | ||
CMD ["node", "dist/main"] |
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,17 +1,7 @@ | ||
import { Body, Controller, Get, Param, Post } from '@nestjs/common'; | ||
import { Controller } from '@nestjs/common'; | ||
import { AppService } from './app.service'; | ||
import { Space } from './schema/space.schema'; | ||
|
||
@Controller() | ||
export class AppController { | ||
constructor(private readonly appService: AppService) {} | ||
|
||
@Post('mongo') | ||
async mongoSaveTest(@Body() createSpaceDto: Partial<Space>) { | ||
return await this.appService.mongoSave(createSpaceDto); | ||
} | ||
@Get('mongo/:id') | ||
async mongoFindTest(@Param('id') id: string) { | ||
return await this.appService.mongoFind(id); | ||
} | ||
} |
Oops, something went wrong.