Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
d55ae57
chore: nest 설치
hoheesu Dec 17, 2024
70206e7
chore: 폴더구조 변경
hoheesu Dec 17, 2024
9f1bb07
Merge branch 'develop' of https://github.com/vsCode-Game/BE into develop
hoheesu Dec 17, 2024
da0e890
chore: nest 폴더구조 재구성
hoheesu Dec 17, 2024
81524cf
chore: githubAction workflow (DOCKER) 작성
hoheesu Dec 18, 2024
7402d8b
fix: dockerfile 수정
hoheesu Dec 18, 2024
3a65b23
fix: dockerfile 수정
hoheesu Dec 18, 2024
56d9b1a
Fix: Rename DockerFile to dockerfile
hoheesu Dec 18, 2024
0837b6b
Chore: ec2 인스턴스 생성이후 githubAction 연결 - 도커 이미지 ec2에 연결
hoheesu Dec 18, 2024
27af593
Fix: SSH 권한 설정을 위해 deploy.yml파일 수정
hoheesu Dec 18, 2024
5ea7d72
Fix: SSH 권한 설정을 위해 deploy.yml파일 수정
hoheesu Dec 18, 2024
1455b88
Fix: SSH 권한 설정을 위해 deploy.yml파일 수정
hoheesu Dec 18, 2024
e873635
Fix: SSH 권한 설정을 위해 deploy.yml파일 수정
hoheesu Dec 18, 2024
99030dc
Fix: SSH 권한 설정을 위해 deploy.yml파일 수정
hoheesu Dec 18, 2024
35dc9e4
Fix: SSH 권한 설정을 위해 deploy.yml파일 수정
hoheesu Dec 18, 2024
4d2b083
Fix: SSH 권한 설정을 위해 deploy.yml파일 수정
hoheesu Dec 18, 2024
f3f7edb
Fix: ec2 배포 및 docker 설정을 위해 deploy.yml파일 수정
hoheesu Dec 18, 2024
73b1044
Fix: ec2 서버에서 docker-compose 설정을 위해 변경
hoheesu Dec 18, 2024
d06b356
Fix: ec2 서버에서 docker-compose 설정을 위해 변경
hoheesu Dec 18, 2024
9405dc4
Fix: ec2 서버에서 docker-compose 설정을 위해 변경
hoheesu Dec 18, 2024
891e6b0
Chore: 폴더 구조 변경
hoheesu Dec 19, 2024
2f08bcb
Chore: 도커 env 설정
hoheesu Dec 23, 2024
b9da440
Chore: env환경 분리 및 의존성 추가
hoheesu Dec 23, 2024
bf1ef70
Chore: develop 개발 환경 분리를 위한 docker-compose 분리
hoheesu Dec 23, 2024
2d16ecc
Chore: githubAction 오류 해결
hoheesu Dec 23, 2024
ca0aba0
Feat: mySQL db연결 및 테스트 코드
hoheesu Dec 26, 2024
139211b
Feat: userEntity수정
hoheesu Dec 26, 2024
c8462a0
Feat: 회원가입 기능 구현
hoheesu Dec 27, 2024
16357fa
Feat: 로그인, 이메일 중복검사 기능 완료
hoheesu Dec 27, 2024
733e24c
Feat: 로그인 시 엑세스토큰 발급 및, REDIS 저장
hoheesu Dec 29, 2024
b4c50b5
Feat: docker-compose 수정 및 redis 연결 수정
hoheesu Dec 29, 2024
49b385a
Feat: 테스트를 위한 엑세스토큰 만료시간 증가
hoheesu Dec 30, 2024
2c3b117
Fix: ec2 서버 도커이미지 pull 수정
hoheesu Dec 30, 2024
b71e782
Fix: ec2 서버 도커이미지 pull 수정
hoheesu Dec 30, 2024
747bdd3
Fix: ec2 서버 도커이미지 pull 수정
hoheesu Dec 30, 2024
dc4a877
Feat: refresh Token 쿠키저장 기능 추가
hoheesu Jan 1, 2025
222132f
Fix: ec2 서버 docker이미지 에러 수정중
hoheesu Jan 1, 2025
f59c411
Feat: 배포server 쿠키 에러 수정
hoheesu Jan 1, 2025
e030bda
Feat: 배포server 쿠키 에러 수정
hoheesu Jan 1, 2025
e18f88a
Rename: 폴더 구조 수정
hoheesu Jan 2, 2025
2bca3ec
Remove: gameRoom폴더 삭제
hoheesu Jan 2, 2025
64d98db
Feat: 게임방 생성/입장/퇴장 http 통신 구현
hoheesu Jan 2, 2025
7854731
Docs: swagger틀 완성
hoheesu Jan 2, 2025
d1ac600
Merge pull request #3 from vsCode-Game/feat/gameRoom
hoheesu Jan 2, 2025
738d518
Fix: EC2 빌드 설정 수정
hoheesu Jan 2, 2025
cf7793f
Fix: EC2 빌드 설정 수정
hoheesu Jan 2, 2025
839e488
Docs: gameroom / auth path swagger 추가
hoheesu Jan 3, 2025
6722c87
Feat: 게임방 리스트 전체 조회 기능 추가
hoheesu Jan 3, 2025
0ef4f84
Feat: 게임방 리스트 전체 조회 기능 추가
hoheesu Jan 3, 2025
7358d6a
Feat: 게임방 입장후 채팅 기능 구현
hoheesu Jan 6, 2025
dbc98d2
Feat: 게임방 퇴장 시 웹소켓 종료 완료
hoheesu Jan 7, 2025
5850e23
Feat: 게임방 퇴장 시 웹소켓 종료 완료
hoheesu Jan 7, 2025
cf28e63
Feat: 게임방 입장 후 레디 / 카드덱 고르기 까지 성공
hoheesu Jan 10, 2025
7f4755d
Feat: 조커 위치 정하기 수정
hoheesu Jan 12, 2025
66c280e
Merge pull request #7 from vsCode-Game/feat/socket
hoheesu Jan 12, 2025
e3fdd67
Feat: 카드 순서정렬 로직 제대로 구현
hoheesu Jan 12, 2025
5d6f619
Merge pull request #8 from vsCode-Game/feat/socket
hoheesu Jan 12, 2025
d5a2d76
feat: 모든 게임로직 완료
hoheesu Jan 13, 2025
94d7f8c
Merge pull request #9 from vsCode-Game/feat/socket
hoheesu Jan 13, 2025
6666b5c
fix: signup User entity변경에 맞춰 수정
hoheesu Jan 13, 2025
12b230f
Merge pull request #10 from vsCode-Game/fix/user
hoheesu Jan 13, 2025
ee03eae
feat: 첫카드덱 뽑는 로직 수정
hoheesu Jan 13, 2025
51fef26
feat: unready추가
hoheesu Jan 13, 2025
063982d
Merge pull request #11 from vsCode-Game/fix/user
hoheesu Jan 13, 2025
8c1bcb5
fix: 코스에러 수정
hoheesu Jan 13, 2025
9029361
Merge pull request #12 from vsCode-Game/fix/user
hoheesu Jan 13, 2025
7a87d7c
Docs: 스웨거 authorization 추가
hoheesu Jan 14, 2025
6e18e80
Merge pull request #13 from vsCode-Game/fix/user
hoheesu Jan 14, 2025
a544f1e
fix: getGameRoom 게임방 정보 조회시 유저 닉네임도 returun
hoheesu Jan 15, 2025
a965f85
fix: 게임방 소켓 disconnect 상황에서 게임방 나가지는 로직 수정
hoheesu Jan 15, 2025
b1041f9
Merge pull request #14 from vsCode-Game/fix/user
hoheesu Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
68 changes: 68 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Docker CI/CD Pipeline

on:
push:
branches:
- develop
pull_request:
branches:
- develop

jobs:
build-and-push:
name: 도커 이미지화
runs-on: ubuntu-latest

steps:
- name: 리포지토리 코드 체크아웃
uses: actions/checkout@v3

- name: .env복사
run: |
echo "${{ secrets.ENV_PRODUCTION }}" > ./.env

- name: Docker Buildx 설정
uses: docker/setup-buildx-action@v2

- name: Docker Hub 로그인
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Docker 이미지 빌드 및 푸시
uses: docker/build-push-action@v4
with:
context: ./
file: ./Dockerfile.product
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/nestjs-app:latest

deploy:
name: 서버 배포
needs: build-and-push
runs-on: ubuntu-latest

steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: 서버 배포 및 상태 확인
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd /home/ubuntu
echo "${{ secrets.ENV_PRODUCTION }}" > .env
docker-compose down
docker-compose pull # 필요한 경우에만 업데이트
docker-compose up -d --build # 필요한 서비스만 다시 빌드
docker image prune -f # 사용하지 않는 이미지 삭제
echo "=== Docker 컨테이너 상태 ==="
docker-compose ps
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# compiled output
/dist
/node_modules
/build

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local
.env.*

# temp directory
.temp
.tmp

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["cweijan.dbclient-jdbc"]
}
20 changes: 20 additions & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# 1. Node.js 기반 이미지 설정 (NestJS 실행 환경)
FROM node:20

# 2. 작업 디렉토리 설정
WORKDIR /usr/src/app/

# 3. 의존성 파일(package.json 및 package-lock.json) 복사
COPY package*.json ./

# 4. npm 패키지 설치
RUN npm install

# 5. 소스 코드 복사
COPY . .

# 7. 실행 명령어 설정
CMD ["npm", "run", "start:dev"]

# 8. 애플리케이션 실행에 사용할 포트 노출
EXPOSE 3000
27 changes: 27 additions & 0 deletions Dockerfile.product
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 1. Node.js 기반 이미지 설정 (NestJS 실행 환경)
FROM node:20

# 2. 작업 디렉토리 설정
WORKDIR /usr/src/app/

# 3. 의존성 파일(package.json 및 package-lock.json) 복사
COPY package*.json ./

COPY .env ./

# 4. npm 패키지 설치
RUN npm install

# 5. 소스 코드 복사
# 코드가 하나라도 변경되면 캐싱 무력화
# COPY 바뀔 확률이 낮은 파일들만
COPY . .

# 6. NestJS 애플리케이션 빌드 (TypeScript → JavaScript)
RUN npm run build

# 7. 실행 명령어 설정
CMD ["node", "dist/main"]

# 8. 애플리케이션 실행에 사용할 포트 노출
EXPOSE 3000
21 changes: 0 additions & 21 deletions LICENSE

This file was deleted.

101 changes: 98 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,99 @@
## BE 팀원
<p align="center">
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
</p>

윤준수
김우정
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest

<p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
<p align="center">
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
<a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
<a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a>
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a>
</p>
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->

## Description

[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.

## Project setup

```bash
$ npm install
```

## Compile and run the project

```bash
# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod
```

## Run tests

```bash
# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov
```

## Deployment

When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.

If you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:

```bash
$ npm install -g mau
$ mau deploy
```

With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.

## Resources

Check out a few resources that may come in handy when working with NestJS:

- Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
- For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
- To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
- Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.
- Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
- Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
- To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
- Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).

## Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).

## Stay in touch

- Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
- Website - [https://nestjs.com](https://nestjs.com/)
- Twitter - [@nestframework](https://twitter.com/nestframework)

## License

Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).
Loading
Loading