diff --git a/app/Dockerfile b/app/Dockerfile index 52b036e..6e15b52 100644 --- a/app/Dockerfile +++ b/app/Dockerfile @@ -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" && \ diff --git a/app/routers/voices.py b/app/routers/voices.py index b7d35d8..1bd53f1 100644 --- a/app/routers/voices.py +++ b/app/routers/voices.py @@ -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: @@ -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}) # 채팅방 별 저장한 목소리 목록 조회 @@ -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}) diff --git a/docker-compose-deploy.yml b/docker-compose-deploy.yml index 2b1b109..74f7c9f 100644 --- a/docker-compose-deploy.yml +++ b/docker-compose-deploy.yml @@ -45,6 +45,8 @@ services: - '--config.file=/etc/prometheus/prometheus.yml' ports: - "9090:9090" + environment: + - TZ=Asia/Seoul networks: - teamhnet @@ -57,6 +59,8 @@ services: - ./monitoring/grafana/dashboards:/etc/grafana/provisioning/dashboards/ ports: - "3000:3000" + environment: + - TZ=Asia/Seoul networks: - teamhnet @@ -72,6 +76,8 @@ services: - /sys:/sys:ro - /var/lib/docker/:/var/lib/docker:ro privileged: true + environment: + - TZ=Asia/Seoul networks: - teamhnet @@ -131,6 +137,8 @@ services: ports: - "80:80" restart: always + environment: + - TZ=Asia/Seoul networks: - teamhnet @@ -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: