Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #40

Merged
merged 264 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
264 commits
Select commit Hold shift + click to select a range
c981fae
feat: update & delete s3 image
astorverse Apr 11, 2024
456d9ba
Merge pull request #4 from DevKor-github/feature/imgly
astorverse Apr 11, 2024
e064525
feat: add cors restriction
astorverse Apr 11, 2024
d9f3c80
fix: only get kakaoId on kakao-user.dto
astorverse Apr 12, 2024
89152d4
fix: delete username & profile_image from user create dto
astorverse Apr 12, 2024
86a0bdc
feat: add user tempname create logic
astorverse Apr 12, 2024
7e68aa0
feat: set user profile image default value 0
astorverse Apr 12, 2024
51048d9
fix: set username unique column
astorverse Apr 12, 2024
1fee33b
Merge pull request #10 from DevKor-github/feature/kakao-auth
astorverse Apr 12, 2024
7831eb8
feat: fetch user's posts with category restriction option
astorverse Apr 13, 2024
e2fe683
feat: add category naming constraint
astorverse Apr 13, 2024
1ac1ef8
feat: divide functions of AuthGuard for parsing middleware & guard
astorverse Apr 14, 2024
69df25b
docs: correct post&comment response dto
astorverse Apr 15, 2024
51aed1c
feat: change whole apis guard to AuthGuardV2
astorverse Apr 15, 2024
be45214
docs: correct posts api dtos
astorverse Apr 15, 2024
b79e573
Merge pull request #12 from DevKor-github/feature/fetch-posts-apis
astorverse Apr 15, 2024
3ebece0
Merge pull request #13 from DevKor-github/develop
astorverse Apr 15, 2024
0f692c6
feat: check if comments parentId is root
astorverse Apr 16, 2024
f8d5365
docs: add response info
astorverse Apr 16, 2024
b4b80ad
Merge pull request #14 from DevKor-github/feature/comments
astorverse Apr 16, 2024
6888b03
fix: delete unused dto
astorverse Apr 16, 2024
ddf11aa
fix: patch user response dto
astorverse Apr 16, 2024
62a64a2
fix: patch user response dto
astorverse Apr 16, 2024
c6707e2
fix: delete unused dto
astorverse Apr 16, 2024
65b910d
feat: add index to date_created column on posts&comment entity
astorverse Apr 17, 2024
06c4296
feat: add cursor-based pagination
astorverse Apr 18, 2024
f0bfb2f
docs: add swagger on cursor pagination api & dtos
astorverse Apr 20, 2024
0b62925
Merge pull request #15 from DevKor-github/feature/fetch-posts-apis
astorverse Apr 20, 2024
7e445c9
feat: add friends post fetching api
astorverse Apr 20, 2024
f3f4ac9
feat: change fetching api to cursor-based-pagination
astorverse Apr 21, 2024
c124e35
Merge pull request #16 from DevKor-github/feature/fetch-posts-apis
astorverse Apr 21, 2024
51a8e24
refactor: optimize & extract cursorPagination
astorverse Apr 21, 2024
c49927d
Merge pull request #17 from DevKor-github/feature/fetch-posts-apis
astorverse Apr 21, 2024
321d307
refactor: delete unused params
astorverse Apr 23, 2024
8421d16
Merge pull request #18 from DevKor-github/feature/fetch-posts-apis
astorverse Apr 23, 2024
27a5e08
feat: sse connection & notification api
astorverse Apr 28, 2024
af4ab1e
feat: sse connection & notification api
astorverse Apr 28, 2024
a6dac31
fix: emit-noti.dto name
astorverse Apr 28, 2024
3ad2055
Merge pull request #19 from DevKor-github/feature/sse-noti
astorverse Apr 28, 2024
e9a943a
feat: image resizing
astorverse Apr 30, 2024
ef71ce4
Merge pull request #21 from DevKor-github/feature/imgly
astorverse May 1, 2024
fd5ef7f
feat: create report api
astorverse May 6, 2024
d8fb714
feat: fetch reports API
astorverse May 6, 2024
710d247
feat: add FK & transaction on report API
astorverse May 6, 2024
dd886a6
feat: block duplicated report request from single user
astorverse May 6, 2024
0253446
Merge pull request #22 from DevKor-github/feature/reports
astorverse May 6, 2024
0a6323a
feat: create anmt api
astorverse May 7, 2024
a58f119
feat: delete anmt api
astorverse May 7, 2024
03549e2
feat: patch anmt api
astorverse May 7, 2024
c3e942f
Merge pull request #23 from DevKor-github/feature/announcements
astorverse May 7, 2024
fdb5449
refactor: change endpoints of authController
astorverse May 8, 2024
25b8c34
refactor: change endpoints of anmtController
astorverse May 8, 2024
282e1ae
refactor: change anmt to plural
astorverse May 8, 2024
ac3ced3
refactor: change endpoints of commmentsController
astorverse May 8, 2024
ca963a5
refactor: change endpoints of likesController
astorverse May 8, 2024
d9a21bc
refactor: change endpoints of neighborsController
astorverse May 8, 2024
cbf4e80
refactor: change endpoints of notificationsController
astorverse May 8, 2024
4c0c542
refactor: change endpoints of categoriesController
astorverse May 8, 2024
168eb73
refactor: change endpoints of postsController
astorverse May 8, 2024
93e4962
refactor: change endpoints of usersController
astorverse May 8, 2024
dba86f6
Merge pull request #25 from DevKor-github/refactor/restful-endpoints
astorverse May 8, 2024
699b489
refactor: divide likesChecking logic
astorverse May 8, 2024
37d6b6f
Merge pull request #26 from DevKor-github/refactor/restful-endpoints
astorverse May 8, 2024
52dec6a
feat: GET comments api
astorverse May 8, 2024
5585d51
feat: my category fetch Apis
astorverse May 9, 2024
5f05f43
refactor: change unfollow Api from post to delete
astorverse May 9, 2024
b3f0297
feat: patch category & comment API
astorverse May 9, 2024
bc15a2a
fix: change querystring name from postCategoryName to category-name
astorverse May 9, 2024
023490d
feat: add Date-limit option on cursor based pagination
astorverse May 9, 2024
dc1698f
Merge pull request #27 from DevKor-github/feature/api-enhancements
astorverse May 9, 2024
d62cb41
fix: date-sort option
astorverse May 9, 2024
852f3dd
Merge pull request #29 from DevKor-github/feature/api-enhancements
astorverse May 9, 2024
0e027eb
feat: agreements Entity
astorverse May 9, 2024
98e0584
refactor: directory structure
astorverse May 10, 2024
a88a013
refactor: directory structure
astorverse May 10, 2024
3aa6293
feat: create agreements api
astorverse May 11, 2024
9b0e8be
refactor: neighbor -> follow
astorverse May 11, 2024
92e43c2
refactor: neighbor -> follow
astorverse May 11, 2024
0d8e453
Merge pull request #30 from DevKor-github/refactor/entities-name
astorverse May 11, 2024
6e9f6af
feat: feedback entity
astorverse May 11, 2024
e2b92e7
refactor: change endpoints of report
astorverse May 11, 2024
94460f4
feat: fetch agreements APIs
astorverse May 11, 2024
eac0f31
feat: patch agreements API
astorverse May 12, 2024
c73e2fd
feat: serving static policy
astorverse May 13, 2024
9022207
Merge pull request #32 from DevKor-github/feature/agreements
astorverse May 13, 2024
bba2d1b
Merge pull request #31 from DevKor-github/feature/reports
astorverse May 13, 2024
bf08bba
Merge branch 'develop' of github.com:DevKor-github/team-sprint-blccu-…
astorverse May 13, 2024
0007912
feat: create & read feedback apis
astorverse May 13, 2024
2b6e9df
Merge pull request #33 from DevKor-github/feature/feedbacks
astorverse May 13, 2024
4b2121b
feat: user handle column
astorverse May 13, 2024
a46e2f7
fix: change user posts fetch api handler from cg name to id
astorverse May 13, 2024
f908d1d
fix: divide toggle like into separate create & delete logic
astorverse May 13, 2024
535eb1c
feat: exclude comment-fetching in posts detail response API
astorverse May 13, 2024
00b0706
feat: add interfaces on postsService & Repo
astorverse May 14, 2024
e6efdc3
fix: revised jwt decode on agreements API
astorverse May 14, 2024
bb7ef00
Merge pull request #34 from DevKor-github/feature/api-enhancements
astorverse May 14, 2024
95cc466
refactor: change endpoints of sticker related APIs
astorverse May 15, 2024
7690367
fix: local hosting
astorverse May 18, 2024
db637cb
fix: local hosting option
astorverse May 18, 2024
9a8a112
Merge pull request #35 from DevKor-github/feature/stickers
astorverse May 18, 2024
9332de9
fix: sameSite policy
astorverse May 18, 2024
92bdc64
fix: delete cookie domain distribution
astorverse May 18, 2024
f004273
fix: client-domain
astorverse May 18, 2024
3ded222
feat: change category detail fetching API for public
astorverse May 18, 2024
edb7993
feat: follow exist check
astorverse May 18, 2024
b8cd10f
fix: update user handle
astorverse May 18, 2024
de8c8b5
feat: many things
astorverse May 18, 2024
4da2c1c
fix: add loggedUser validation on follows repo
astorverse May 18, 2024
1984b53
feat: add follow_count on user table
astorverse May 18, 2024
ec0ae3b
feat: add follow_count transaction logic
astorverse May 19, 2024
cd2111f
fix: accuracy of follow list isFollowing
astorverse May 19, 2024
000ddbb
fix: delete targetUser FK on report entity
astorverse May 19, 2024
2a6767f
refactor: update Agreements interface
astorverse May 20, 2024
13925b4
refactor: update Announcement interface
astorverse May 20, 2024
c8a7be8
refactor: update comment interface
astorverse May 20, 2024
015fc40
refactor: update feedback interface
astorverse May 20, 2024
6191291
refactor: update follow interface & followUserDto
astorverse May 23, 2024
c44a0dc
refactor: update followRepos interface & response type
astorverse May 23, 2024
9873951
refactor: update likes interface & fetchLikeResponseDto
astorverse May 23, 2024
370c5c1
feat: delete sendNoti API
astorverse May 23, 2024
16704eb
refactor: update notifications interface
astorverse May 23, 2024
28d0df1
refactor: update notifications interface
astorverse May 23, 2024
05ddc2e
feat: add caching dependencies (cache-manager, cache-manager-redis-st…
astorverse May 23, 2024
17c86af
feat: add caching dependency (redis)
astorverse May 23, 2024
31daef8
feat: add caching dependency (cache-manager-redis-yet)
astorverse May 23, 2024
f858a39
feat: add queue dependencies (@nestjs/bull bull)
astorverse May 23, 2024
1c25e73
feat:change whole module imports process using configModule
astorverse May 23, 2024
57190eb
fix: change NotType Enum
astorverse May 23, 2024
518f12e
fix: delete 'message' column on not entity
astorverse May 24, 2024
281df92
feat: add cache on fetchPost
astorverse May 27, 2024
40a8027
fix: change follow scope condition
astorverse May 27, 2024
7334803
fix: change stickerBlock Entitiy schema
astorverse May 27, 2024
6aa7f09
feat: send noti when writing comment & reply
astorverse May 27, 2024
434b9f1
feat: add Interface & response type on fetchCommentWithNotiInfo
astorverse May 27, 2024
a538318
feat: send noti on following process
astorverse May 27, 2024
9b47eb7
feat: send noti when liking post
astorverse May 27, 2024
504ce06
fix: dockerignore
astorverse May 27, 2024
67dfaf9
feat: blue green zero dt deployment
astorverse May 27, 2024
8419565
feat: delete imgly
astorverse May 27, 2024
e11da0e
feat: add health check process on blue green deployment
astorverse May 27, 2024
a04f3d8
feat: patch post API
astorverse May 29, 2024
aeb23f3
feat: add node-exporter
astorverse Jun 1, 2024
fe1b369
fix: revise clear-cookie domain
astorverse Jun 2, 2024
26eb93a
fix: revise comment select option
astorverse Jun 2, 2024
405f419
feat: delete user api
astorverse Jun 2, 2024
00f24dc
feat: add feedback type column
astorverse Jun 2, 2024
ccf0356
feat: orm migration init
astorverse Jun 2, 2024
3b17003
fix: add fetch without delete option
astorverse Jun 2, 2024
9e18315
fix: fetching onboarding contract open scope
astorverse Jun 2, 2024
3671e72
fix: profile/background image's ext to jpg
astorverse Jun 2, 2024
0d17ab2
fix: change exception to logger on s3 delete api
astorverse Jun 3, 2024
2ddd358
feat: delete image from s3 when patch profile&background image
astorverse Jun 3, 2024
ec9d605
feat: divide image resize options
astorverse Jun 3, 2024
567206c
feat: add design_licence on agreement
astorverse Jun 4, 2024
d1ae699
fix: change agreement reserving file type from txt to html
astorverse Jun 4, 2024
9e10b2a
fix: token refresh logic
astorverse Jun 4, 2024
fdb426b
fix: comment delete logic
astorverse Jun 4, 2024
c496f00
fix: comment delete logic
astorverse Jun 4, 2024
7b29380
feat: delete images & stickerBlocks when deleting post
astorverse Jun 4, 2024
85bb616
feat: delete sticker api
astorverse Jun 4, 2024
781bb43
fix: select children comments which is not soft deleted
astorverse Jun 4, 2024
61888b6
feat: change username searching algorithm to fulltext idx search
astorverse Jun 4, 2024
3d4956e
fix: comment fetching logic without soft del col
astorverse Jun 5, 2024
f20ad10
fix: inner filtering comments
astorverse Jun 5, 2024
9fc3361
feat: bulkInsert sticker API
astorverse Jun 5, 2024
d225c0d
feat: add stickers.service.interface
astorverse Jun 5, 2024
70de51c
fix: divide comments delete logic when delete user
astorverse Jun 5, 2024
d1e7633
fix: revise refresh-token cookie domain
astorverse Jun 5, 2024
78e2707
feat: add monitoring dependency(nestjs-prometheus)
astorverse Jun 5, 2024
a7f2352
feat: add prom monitorting
astorverse Jun 5, 2024
35d3639
feat: add promQueries
astorverse Jun 6, 2024
e2b1bf2
fix: change sticker mapping logic to bulk inserting
astorverse Jun 6, 2024
87ff1d5
fix: add basic resizing on POST posts/image
astorverse Jun 6, 2024
dad932b
feat: add interfaces on stickerCategoriesService
astorverse Jun 6, 2024
9788db4
add responseType on stickerCategoriesController
astorverse Jun 6, 2024
9b9f7d2
fix: change postBackground nullable option to true
astorverse Jun 6, 2024
54d858e
feat: add title_html column on posts
astorverse Jun 6, 2024
98e00be
fix: change temp post dto
astorverse Jun 6, 2024
dd28fc1
fix: check comment allowance when inserting comment
astorverse Jun 6, 2024
44f79fb
feat: add interfaces on stickerBlock.service
astorverse Jun 9, 2024
e9de3e8
feat: change image GET url from s3 to cloudfront
astorverse Jun 9, 2024
8e3b53a
fix: change fetchNotiResponse
astorverse Jun 10, 2024
114f204
fix: change sse sending data
astorverse Jun 10, 2024
9afa95c
fix: change sse timeout to 10m
astorverse Jun 10, 2024
5afdc47
fix: block self emitting notification
astorverse Jun 10, 2024
1c8008e
fix: send notification for replies to self-comments on own posts
astorverse Jun 12, 2024
65b457c
feat: filter soft_deleted comments not having chidlren
astorverse Jun 12, 2024
445e748
fix: comments fetching filtering
astorverse Jun 12, 2024
5a80db7
feat: delete user's information when soft deleting user
astorverse Jun 14, 2024
4270de4
feat: delete notification when deleting user
astorverse Jun 15, 2024
1faf65e
feat: add fk post & postId column on notification
astorverse Jun 15, 2024
5374651
docs: fix noti entity swagger description
astorverse Jun 24, 2024
e48555e
feat: check mutual follow condition and decide scope when cursor fetc…
astorverse Jun 24, 2024
ab3a65c
fix: temporary change username searching
astorverse Jun 24, 2024
8cef506
feat: upload stickerBlock if publish post
astorverse Jul 1, 2024
5d4dbf3
feat: add refactoring dependency(@nestjs/devtools-integration)
astorverse Jul 4, 2024
71fd55e
feat: add DevToolsModule on appModule
astorverse Jul 4, 2024
2990b16
refactor(agreement): unify naming convention
astorverse Jul 4, 2024
a4f5ec1
refactor(announcement): unify naming convention
astorverse Jul 4, 2024
72e8196
refactor(article): unify naming convention
astorverse Jul 4, 2024
59b566b
refactor(article): change layers name
astorverse Jul 4, 2024
1a779ac
refactor(articleBackgrounds): change domain name postBackgrounds -> a…
astorverse Jul 4, 2024
207f4d5
refactor(articleCategories): unify naming convention
astorverse Jul 4, 2024
10d7136
refactor(user): unify naming convention
astorverse Jul 4, 2024
5edcd56
refactor(comment): unify naming convention
astorverse Jul 4, 2024
91b04e6
refactor(feedback): unify naming convention
astorverse Jul 4, 2024
ea0cd2f
refactor(follow): unify naming convention
astorverse Jul 4, 2024
23bf281
refactor(like): unify naming convention
astorverse Jul 4, 2024
c5e7e90
refactor(notification): unify naming convention
astorverse Jul 4, 2024
b467484
refactor(report): unify naming convention
astorverse Jul 4, 2024
19a6aa6
refactor(stickerBlock): unify naming convention
astorverse Jul 4, 2024
70cd400
refactor(stickerCategory): unify naming convention
astorverse Jul 4, 2024
2869e69
refactor(entity): unify naming convention
astorverse Jul 4, 2024
b4cb8b1
refactor(sticker): unify naming convention
astorverse Jul 4, 2024
1fb8974
refactor(article): divide repository
astorverse Jul 4, 2024
4980c3d
refactor(article): change dtos & divide layers
astorverse Jul 6, 2024
38986d8
refactor(utils): divide utils
astorverse Jul 6, 2024
8a06068
refactor(users): divide usersService
astorverse Jul 6, 2024
e0a181d
refactor(users): divide usersController
astorverse Jul 6, 2024
aec35fd
refactor(users): reorganize module structure
astorverse Jul 6, 2024
d04e232
refactor(Agreement): Apply naming conventions and update linked value…
astorverse Jul 6, 2024
efafaf5
refactor(Announcement): Apply naming conventions and update linked va…
astorverse Jul 6, 2024
f7604ce
refactor(ArticleBackground): Apply naming conventions and update link…
astorverse Jul 6, 2024
79167e3
refactor(ArticleCategory): Apply naming conventions and update linked…
astorverse Jul 6, 2024
fbc5f81
refactor(Notification): Apply naming conventions and update linked va…
astorverse Jul 6, 2024
f008965
refactor(Follow): Apply naming conventions and update linked values w…
astorverse Jul 6, 2024
49d983e
refactor(Auth): Apply naming conventions and update linked values wit…
astorverse Jul 6, 2024
868f72f
refactor(feedback): Apply naming conventions and update linked values…
astorverse Jul 6, 2024
62939be
refactor(Like): Apply naming conventions and update linked values wit…
astorverse Jul 6, 2024
a23e2ad
refactor(Report): Apply naming conventions and update linked values w…
astorverse Jul 6, 2024
c0b822e
refactor(StickerBlock): Apply naming conventions and update linked va…
astorverse Jul 6, 2024
760aa70
refactor(Sticker): Apply naming conventions and update linked values …
astorverse Jul 6, 2024
aec0e4e
fix(*): bugs & errors occured while refactoring
astorverse Jul 6, 2024
7ac75d3
fix(entities): swagger circular dependencies
astorverse Jul 8, 2024
788b59b
fix(entities): some non-snake cases columns to snake
astorverse Jul 8, 2024
c666f22
fix(user): user search logic with following data
astorverse Jul 8, 2024
e92d101
docs(readme): add mermaid erd
astorverse Jul 9, 2024
e8056a2
fix(follow): follower list finding query
astorverse Jul 9, 2024
50219db
fix(*): repositorys' db rows naming
astorverse Jul 9, 2024
8017dc9
Merge pull request #38 from DevKor-github/refactor/entity-columns
astorverse Jul 9, 2024
1d1f24d
fix(pagination): cursor query error
astorverse Jul 9, 2024
8481f99
fix(userFollowingDto): change to extends userPriDto
astorverse Jul 10, 2024
2484874
fix(workflow): change CI code
astorverse Jul 10, 2024
4072f94
fix(workflow): add secret variables
astorverse Jul 10, 2024
a182899
fix(userPrimaryResDto): add description column
astorverse Jul 10, 2024
3b2248f
feat(prod): connect to production server
astorverse Jul 12, 2024
6cd362c
feat(comments): add find own comments api
astorverse Jul 12, 2024
7c4bf9c
fix(aws): delete acl access
astorverse Jul 16, 2024
78ae2eb
fix(articlesRead): synchronized swagger
astorverse Jul 16, 2024
795ff31
feat(article): add current_image_id column
astorverse Jul 17, 2024
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
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.git
/dist
node_modules
.dockerignore
Dockerfile
/deploy
80 changes: 80 additions & 0 deletions .github/workflows/deploy-to-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Deploy to Staging

on:
push:
branches:
- staging

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16' # 필요한 Node.js 버전으로 설정

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_STAGING_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_STAGING_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Login to ECR
run: aws ecr get-login-password --region ${{ secrets.AWS_REGION }} | docker login --username AWS --password-stdin ${{ secrets.AWS_STAGING_ECR_URL }}

- name: Build Docker image
run: docker buildx build --platform linux/amd64 -t blccu-ecr . --load

- name: Tag Docker image
run: docker tag blccu-ecr:latest ${{ secrets.AWS_STAGING_ECR_URL }}:staging-latest

- name: Push Docker image to ECR
run: docker push ${{ secrets.AWS_STAGING_ECR_URL }}:staging-latest

- name: Create PEM file from secret
run: echo "${{ secrets.BLCCU_STAGING_RSA_PEM }}" > blccu-staging-rsa.pem

- name: Deploy to server
run: |
chmod 400 blccu-staging-rsa.pem
ssh -o StrictHostKeyChecking=no -i blccu-staging-rsa.pem ubuntu@${{ secrets.BLCCU_STAGING_HOST }} << 'EOF'
set -e
NEW_PORT=3001
CURRENT_PORT=$(grep 'server localhost:' /etc/nginx/nginx.conf | awk '{print $2}' | cut -d ':' -f 2 | sed 's/;//')
if [ "$CURRENT_PORT" = "3001" ]; then
NEW_PORT=3000
fi
docker pull ${{ secrets.AWS_STAGING_ECR_URL }}:staging-latest
docker run --env-file .env.staging -d --memory="512m" --cpus="0.5" -p $NEW_PORT:3000 --name blccu-ecr-$NEW_PORT -e TZ=Asia/Seoul ${{ secrets.AWS_STAGING_ECR_URL }}:staging-latest
for i in {1..20}; do
HEALTH_CHECK=$(curl -s -o /dev/null -w '%{http_code}' http://localhost:$NEW_PORT/health)
if [ "$HEALTH_CHECK" -eq 200 ]; then
break
fi
sleep 5
done
if [ "$HEALTH_CHECK" -ne 200 ]; then
docker stop blccu-ecr-$NEW_PORT && docker rm blccu-ecr-$NEW_PORT
exit 1
fi
sudo sed -i "s/server localhost:$CURRENT_PORT;/server localhost:$NEW_PORT;/g" /etc/nginx/nginx.conf
sudo systemctl restart nginx
docker stop blccu-ecr-$CURRENT_PORT && docker rm blccu-ecr-$CURRENT_PORT
docker images --format "{{.ID}} {{.Repository}}:{{.Tag}}" | grep -v ':staging-latest' | awk '{print $1}' | xargs -r docker rmi
yes | sudo docker system prune -a
EOF

- name: Remove PEM file
run: rm blccu-staging-rsa.pem
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ lerna-debug.log*
.env
.env.*
.env.prod
.env.staging
.env.development.local
.env.test.local
.env.production.local
Expand Down
198 changes: 197 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<img src="readme-assets/logo.png" width="100" height="100" />
<img src="src/assets/readme/logo.png" width="100" height="100" />
<h1>블꾸</h1>
<p>커스텀 극대화 블로그<p>
<a href="https://blccu.com">blccu.com</a>
Expand All @@ -9,3 +9,199 @@

- Nest.js
- mysql/typeORM

## ERD

```mermaid
erDiagram
notification {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
string type
bool is_checked
int article_id FK
int user_id FK
int target_user_id FK
}
follow {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
int to_user_id FK
int from_user_id FK
}
agreement {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
string agreement_type
bool is_agreed
int user_id FK
}
feedback {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
string content
string type
int user_id FK
}
article {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
int article_category_id FK
int article_background_id FK
string html_title
bool is_published
int like_count
int view_count
int comment_count
int report_count
bool allow_comment
string scope
string content
string main_description
string image_url
string main_image_url
int user_id FK
}
article_category {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
string name
int user_id FK
}
article_background {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
string image_url
}
user {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
string handle
string current_refresh_token
bool is_admin
int following_count
int follower_count
string username
string description
string profile_image
string background_image
}
comment {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
int article_id FK
int content
int report_count
int parent_id
int user_id FK
}
report {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
string content
string type
string target
int article_id FK
int comment_id FK
int user_id FK
int target_user_id FK
}
like {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
int article_id FK
int user_id FK
}
sticker_block {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
int sticker_id FK
int article_id FK
float scale
float angle
float pos_x
float pos_y
float z_index
int client_id
}
sticker {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
string image_url
bool is_default
bool is_reusable
int user_id FK
}
sticker_category {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
string name
}
sticker_category_mapper {
int sticker_id FK
int sticker_category_id FK
datetime date_created
datetime date_updated
datetime date_deleted
}
announcement {
int id PK
datetime date_created
datetime date_updated
datetime date_deleted
string title
string content
}

notification ||--o{ article : relates
notification ||--o{ user : notifies
notification ||--o{ user : targets
follow ||--o{ user : follows
follow ||--o{ user : followed_by
agreement ||--o{ user : belongs_to
feedback ||--o{ user : given_by
article ||--o{ article_category : belongs_to
article ||--o{ article_background : has_background
article ||--o{ user : written_by
comment ||--o{ article : related_to
comment ||--o{ user : authored_by
report ||--o{ article : reports
report ||--o{ comment : reports
report ||--o{ user : filed_by
report ||--o{ user : targets
like ||--o{ article : liked
like ||--o{ user : liked_by
sticker_block ||--o{ sticker : contains
sticker_block ||--o{ article : placed_on
sticker ||--o{ user : owned_by
sticker_category_mapper ||--o{ sticker : maps_to
sticker_category_mapper ||--o{ sticker_category : categorized_as
```
Loading