File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ version: "3.9"
22
33services :
44 # =========================================
5- # 1. MySQL Database
5+ # 1. MySQL Database (로컬 개발용)
66 # =========================================
77 db :
88 image : mysql:8.0
@@ -24,14 +24,13 @@ services:
2424 app :
2525 build : .
2626 container_name : studyroom_app
27- # Rails 웹서버(Puma) 대신 gRPC 서버만 실행
2827 command : bash -c "ruby grpc_service/server.rb"
2928 working_dir : /studyroom_service
3029 volumes :
3130 - .:/studyroom_service
3231 - /studyroom_service/tmp
3332 ports :
34- - " 50053:50053 " # gRPC 포트만 노출
33+ - " 50052:50052 " # gRPC 포트
3534 depends_on :
3635 - db
3736 - redis
@@ -45,7 +44,15 @@ services:
4544 BUNDLE_DEPLOYMENT : 0
4645
4746 # ---------------------------------
48- # Database 환경 변수
47+ # gRPC 포트 및 클러스터 연결 환경
48+ # ---------------------------------
49+ GRPC_PORT : " 50052"
50+ REMOTE_DB_HOST : " mysql-user-service.mysql.svc.cluster.local"
51+ REMOTE_DB_PORT : " 3306"
52+ REMOTE_DB_NAME : " user_service_db"
53+
54+ # ---------------------------------
55+ # 로컬 DB 환경
4956 # ---------------------------------
5057 DB_HOST : db
5158 DB_PORT : " 3306"
@@ -54,6 +61,11 @@ services:
5461 DB_NAME_PROD : studyroom_service_production
5562 DB_USERNAME : root
5663 DB_PASSWORD : 1234
64+
65+ secrets :
66+ DB_USERNAME : " "
67+ DB_PASSWORD : " "
68+
5769 restart : always
5870
5971 # =========================================
You can’t perform that action at this time.
0 commit comments