diff --git a/docker-compose.yml b/docker-compose.yml index 92b441b..860af7e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,8 +7,12 @@ services: - .env environment: - SPRING_PROFILES_ACTIVE=prod + - TZ=Asia/Seoul + volumes: + - /etc/localtime:/etc/localtime:ro + - /etc/timezone:/etc/timezone:ro command: - - java -Dspring.profiles.active=${SPRING_PROFILES_ACTIVE} -jar app.jar + - java -Duser.timezone=Asia/Seoul -Dspring.profiles.active=${SPRING_PROFILES_ACTIVE} -jar app.jar # 실행 명령어: jar 파일을 실행하면서 Spring 프로필 활성화 depends_on: - mysql # 이 서비스가 mysql이 먼저 실행된 후 시작되도록 @@ -25,15 +29,19 @@ services: - MYSQL_PASSWORD=cesco07 - MYSQL_ROOT_PASSWORD=1234 # 루트 계정의 비밀번호 - TZ=Asia/Seoul + - JAVA_OPTS=-Duser.timezone=Asia/Seoul command: - --character-set-server=utf8mb4 - --collation-server=utf8mb4_unicode_ci - --default-authentication-plugin=mysql_native_password - --init-connect=SET NAMES utf8mb4 + - --default-time-zone=+09:00 volumes: - mysql-data:/var/lib/mysql # MySQL의 데이터 파일을 호스트에 볼륨으로 영구 저장 # 컨테이너가 삭제돼도 DB 내용은 유지됨 + - /etc/localtime:/etc/localtime:ro # + - /etc/timezone:/etc/timezone:ro networks: - cesco-network # Spring과 같은 네트워크 상에 있어서 mysql이라는 호스트 이름으로 접근 가능 diff --git a/src/main/resources/cesco-BackEnd-config b/src/main/resources/cesco-BackEnd-config index d6704ee..4809408 160000 --- a/src/main/resources/cesco-BackEnd-config +++ b/src/main/resources/cesco-BackEnd-config @@ -1 +1 @@ -Subproject commit d6704eec28f200e35b0711d4828e914d54414f05 +Subproject commit 4809408a5e723bd2d340be14cfe49a4357616f9c