Skip to content

Commit

Permalink
0.1.3 (#38)
Browse files Browse the repository at this point in the history
* feat: get google user info

* feat: 구글 로그인

* fix: PR 코멘트 수정사항 적용

* fix: staging rebase

* feat: 사용 권한 정보 로직

* [SNP-64] Google 로그인 연동

- 소셜 가입 및 로그인 시 토큰 생성 및 저장
- Auth Api 호출 시 토큰 검증 로직 추가
- 가드 통과 후 내정보 조회 데코레이터 추가

* test: user api test

* feat: 소셜 로그인 시 회원 정보 확인

- 회원이 아닐 시, 생성 후 토큰 반환

* [박성호] SNP-65 Letter API 기능 작성 및 네이밍 변경

* [박성호] SNP-65 Letter API 기능 작성 및 네이밍 변경

* feat: 서비스 주석 추가

* [박성호] SNP-65 Letter API 기능 작성 및 네이밍 변경

* fix: 리프레시 솔트 값 변경

* [박성호] SNP-65 Letter API 기능 작성 및 네이밍 변경

* feat: 공통코드 제작용 모듈 생성

* feat: 서비스 타입 별 oauth 인증로직

* feat: 다양한 제공업체 대응을 위한 의존성 분리

* fix: build error

* feat: oauth 인증 에러처리

* feat: 미디움에서 긁어온 이모지 로거 적용

* feat: 냥이 정보 조회하기

* fix: 제거퇸 컬럼  추가

* 0.1.3

---------

Co-authored-by: Sungho95 <80394894+Sungho95@users.noreply.github.com>
Co-authored-by: pilsungchoi <vlftjd159753@gmail.com>
Co-authored-by: pilsung choi <81282655+pilsung-choi@users.noreply.github.com>
  • Loading branch information
4 people authored Dec 18, 2023
1 parent fb8caed commit 4d4d77c
Show file tree
Hide file tree
Showing 49 changed files with 1,007 additions and 263 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: deploy-cluster-prod
on:
push:
branches: ['master']
branches: ['develop']
jobs:
build:
name: Build
Expand All @@ -10,20 +10,20 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
- name: Login to Vultr Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{ secrets.GH_TOKEN }}
registry: sjc.vultrcr.com
username: ${{ secrets.VULTR_REGU }}
password: ${{ secrets.VULTR_REPW }}

- name: Build and push the Docker image
uses: docker/build-push-action@v3
with:
push: true
tags: |
ghcr.io/medici-mansion/shinnyang-server:latest
ghcr.io/medici-mansion/shinnyang-server:${{ github.sha }}
sjc.vultrcr.com/medici/shin-server:latest
sjc.vultrcr.com/medici/shin-server:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
deploy:
Expand All @@ -35,7 +35,7 @@ jobs:
uses: azure/k8s-set-context@v2
with:
method: service-account
k8s-url: https://783da7b8-3679-4834-aadf-a68204c5ebc2.vultr-k8s.com:6443
k8s-url: https://cc33adee-ae13-46cb-9388-19d5a494a094.vultr-k8s.com:6443
k8s-secret: ${{ secrets.KUBERNETES_SECRET }}
- name: Checkout source code
uses: actions/checkout@v3
Expand All @@ -46,4 +46,4 @@ jobs:
manifests: |
k8s/deployment.yaml
images: |
ghcr.io/medici-mansion/shinnyang-server:${{ github.sha }}
sjc.vultrcr.com/medici/shin-server:${{ github.sha }}
11 changes: 4 additions & 7 deletions global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ declare namespace NodeJS {
readonly DB_USER: string;
readonly DB_PWD: string;
readonly DB_NAME: string;
readonly REDIS_HOST: string;
readonly REDIS_PORT: string;
readonly REDIS_PASSWORD: string;
readonly GOOGLE_API_KEY: string;
readonly GOOGLE_AUTH_CLIENT_ID: string;
readonly GOOGLE_REDIRECT_URL: string;
readonly OOGLE_AUTH_CLIENT_SECRET: string;
readonly JWT_SECRET: string;
readonly JWT_EXPIRATION: string;
readonly JWT_REFRESH_EXPIRATION: string;
readonly GOOGLE_CLIENT_SECRET: string;
readonly SALT: string;
readonly ROUND: string;
readonly EXPIRESTOKEN: string;
readonly RES_EXPIRESTOKEN: string;
}
}
117 changes: 62 additions & 55 deletions k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: catsnewyear

spec:
strategy:
type: Recreate
# rollingUpdate:
# maxUnavailable: 1
# maxSurge: 1
minReadySeconds: 5
replicas: 3
selector:
matchLabels:
Expand All @@ -13,59 +20,59 @@ spec:
app: catsnewyear
spec:
containers:
- name: catsnewyear
image: ghcr.io/medici/catsnewyear-server:latest
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 3000
envFrom:
- secretRef:
name: catsnewyear-prod
# env:
# - name: NODE_ENV
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: NODE_ENV
# optional: false
# - name: PORT
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: PORT
# optional: false
# - name: DB_HOST
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: DB_HOST
# optional: false
# - name: DB_PORT
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: DB_PORT
# optional: false
# - name: DB_USER
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: DB_USER
# optional: false
# - name: DB_PWD
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: DB_PWD
# optional: false
# - name: DB_NAME
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: DB_NAME
# optional: false
- name: catsnewyear
image: sjc.vultrcr.com/medici/shin-server
resources:
limits:
memory: '512Mi'
cpu: '1000m'
ports:
- containerPort: 3000
envFrom:
- secretRef:
name: catsnewyear-prod
# env:
# - name: NODE_ENV
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: NODE_ENV
# optional: false
# - name: PORT
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: PORT
# optional: false
# - name: DB_HOST
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: DB_HOST
# optional: false
# - name: DB_PORT
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: DB_PORT
# optional: false
# - name: DB_USER
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: DB_USER
# optional: false
# - name: DB_PWD
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: DB_PWD
# optional: false
# - name: DB_NAME
# valueFrom:
# secretKeyRef:
# name: catsnewyear-prod
# key: DB_NAME
# optional: false
imagePullSecrets:
- name: github-container-registry
- name: vultr-registry
11 changes: 11 additions & 0 deletions k8s/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: catsnewyear
spec:
ports:
- port: 80
protocol: TCP
targetPort: 3000
selector:
app: catsnewyear
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shinnyang",
"version": "0.1.1",
"version": "0.1.3",
"description": "",
"author": {
"name": "Medici",
Expand All @@ -24,6 +24,7 @@
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"@hapi/joi": "^17.1.1",
"@nestjs/axios": "^3.0.1",
"@nestjs/common": "^10.0.0",
"@nestjs/config": "^3.1.1",
Expand All @@ -32,13 +33,12 @@
"@nestjs/platform-express": "^10.0.0",
"@nestjs/swagger": "^7.1.16",
"@nestjs/typeorm": "^10.0.1",
"@types/joi": "^17.2.3",
"axios": "^1.6.2",
"bcrypt": "^5.1.1",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"cross-env": "^7.0.3",
"joi": "^17.11.0",
"helmet": "^7.1.0",
"pg": "^8.11.3",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.1",
Expand All @@ -50,6 +50,8 @@
"@nestjs/testing": "^10.0.0",
"@types/bcrypt": "^5.0.2",
"@types/express": "^4.17.17",
"@types/hapi__joi": "^17.1.14",
"@types/helmet": "^4.0.0",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.1",
"@types/supertest": "^2.0.12",
Expand Down
60 changes: 54 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4d4d77c

Please sign in to comment.