Skip to content

Commit

Permalink
fix: yml 설정 오탈자 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
EunChanNam committed Dec 4, 2023
1 parent 7b7e80e commit 2d00e87
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,20 @@ jobs:
source: "./.env"
target: "./"

- name: ubuntu Docker image build and push
run: |
docker-compose -f ./docker/docker-compose.yml build
docker-compose -f ./docker/docker-compose.yml push
# - name: ubuntu Docker image build
# run: docker build -t ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest -f Dockerfile-server .
#
# - name: Redis Docker image build
# run: docker build -t ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis -f Dockerfile-redis .
# - name: ubuntu Docker image build and push
# run: |
# docker-compose -f ./docker/docker-compose.yml build
# docker-compose -f ./docker/docker-compose.yml push
- name: ubuntu Docker image build
run: docker build -t ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest -f Dockerfile-server .

# - name: ubuntu docker Hub 푸쉬
# run: docker push ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest
# - name: Redis docker Hub 푸쉬
# run: docker push ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis
- name: Redis Docker image build
run: docker build -t ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis -f Dockerfile-redis .

- name: ubuntu docker Hub 푸쉬
run: docker push ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:latest
- name: Redis docker Hub 푸쉬
run: docker push ${{ secrets.DOCKER_NAME }}/we-share-wish-hair:redis

- name: Deploy with push
uses: appleboy/[email protected]
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 5 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ services:
server:
build:
context: ./
dockerfile: server/Dockerfile-server
dockerfile: ../Dockerfile-server
image: eunchannam/we-share-wish-hair:latest
platform: linux/amd64

redis:
build:
context: ./
dockerfile: redis/Dockerfile-redis
image: eunchannam/we-share-wish-hair:redis
dockerfile: ../Dockerfile-redis
image: eunchannam/we-share-wish-hair:redis
platform: linux/amd64
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.inq.wishhair.wesharewishhair.review.application;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.inq.wishhair.wesharewishhair.global.utils.RedisUtils;
import com.inq.wishhair.wesharewishhair.review.domain.entity.Review;
Expand All @@ -17,17 +18,20 @@ public class LikeReviewTestService {
private final ReviewFindService reviewFindService;
private final RedisUtils redisUtils;

@Transactional(readOnly = true)
public long count(Long reviewId) {
return likeReviewRepository.countByReviewId(reviewId);
}

@Transactional
public void clean() {
likeReviewRepository.deleteAll();
}

/**
* LikeReview 생성 후 Review 에 락걸고 likeCount 변수 update
*/
@Transactional
public void withLock(Long reviewId, Long userId) {
likeReviewRepository.save(LikeReview.addLike(userId, reviewId));

Expand All @@ -38,6 +42,7 @@ public void withLock(Long reviewId, Long userId) {
/**
* 레디스에 좋아요 정보가 없으면 새로 등록하고 있으면 INCR 수행
*/
@Transactional
public void withoutLock(Long reviewId, Long userId) {
likeReviewRepository.save(LikeReview.addLike(userId, reviewId));

Expand Down

0 comments on commit 2d00e87

Please sign in to comment.