Skip to content

Commit

Permalink
Merge pull request #161 from 2024-SummerBootcamp-Team/develop
Browse files Browse the repository at this point in the history
[main] main branch 최신화
  • Loading branch information
kalsteve authored Jul 29, 2024
2 parents 8c2df3e + 2f1360e commit 2b50db8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ FROM python:3.10
# 작업 디렉토리 설정
WORKDIR /app

# Timezone 설정
ENV TZ="Asia/Seoul"

# AWS CLI 설치
RUN apt-get install -y curl unzip && \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
Expand Down
6 changes: 3 additions & 3 deletions app/routers/voices.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def read_voices(db: Session = Depends(get_db), skip: int = 0, limit: int = 100):


# 사용자 선택 목소리 저장
@router.post("/{bubble_id}", summary="사용자가 선택한 목소리 저장", description="대화 중 사용자가 선택한 목소리를 DB에 저장합니다.")
@router.post("/{bubble_id}", response_model=ResultResponseModel, summary="사용자가 선택한 목소리 저장", description="대화 중 사용자가 선택한 목소리를 DB에 저장합니다.")
async def create_voice(bubble_id: int, db: Session = Depends(get_db)):
bubble = bubble_service.get_bubble(db, bubble_id=bubble_id)
if not bubble:
Expand All @@ -39,7 +39,7 @@ async def create_voice(bubble_id: int, db: Session = Depends(get_db)):
print(e)
raise HTTPException(status_code=500, detail="실패")
voice = voice_service.create_voice(db, bubble_id=bubble_id, audio_url=audio_url)
return voice
return ResultResponseModel(code=200, message="목소리를 저장했습니다.", data={"audio_url": voice.audio_url})


# 채팅방 별 저장한 목소리 목록 조회
Expand Down Expand Up @@ -88,4 +88,4 @@ def download_voice_count(voice_id: int, db: Session = Depends(get_db)):
if not voice:
raise HTTPException(status_code=404, detail="목소리 정보를 불러오는데 실패했습니다.")
voice_service.get_voice_count(db, voice_id=voice_id)
return ResultResponseModel(code=200, message="목소리 카운트가 올라갔습니다.", data=voice.v_count)
return ResultResponseModel(code=200, message="목소리 카운트가 올라갔습니다.", data={"count": voice.v_count})
9 changes: 9 additions & 0 deletions docker-compose-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ services:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- "9090:9090"
environment:
- TZ=Asia/Seoul
networks:
- teamhnet

Expand All @@ -57,6 +59,8 @@ services:
- ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards/
ports:
- "3000:3000"
environment:
- TZ=Asia/Seoul
networks:
- teamhnet

Expand All @@ -72,6 +76,8 @@ services:
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
privileged: true
environment:
- TZ=Asia/Seoul
networks:
- teamhnet

Expand Down Expand Up @@ -131,6 +137,8 @@ services:
ports:
- "80:80"
restart: always
environment:
- TZ=Asia/Seoul
networks:
- teamhnet

Expand All @@ -139,6 +147,7 @@ services:
image: nginx/nginx-prometheus-exporter:1.3
environment:
- SCRAPE_URI=http://nginx:9110/metrics
- TZ=Asia/Seoul
ports:
- "9113:9113"
networks:
Expand Down

0 comments on commit 2b50db8

Please sign in to comment.