From 2da6581126209699d819a26e465f09a54d7091b4 Mon Sep 17 00:00:00 2001 From: kimhobeen Date: Thu, 19 Oct 2023 19:29:37 +0900 Subject: [PATCH] =?UTF-8?q?:memo:=20docs=20:=20jconsole=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20#559?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/Dockerfile | 6 ++++-- Server/src/main/resources/application.yml | 3 ++- Server/start.sh | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 Server/start.sh diff --git a/Server/Dockerfile b/Server/Dockerfile index 486eeb4e..12b3d7a6 100644 --- a/Server/Dockerfile +++ b/Server/Dockerfile @@ -7,10 +7,12 @@ ARG JAR_FILE=build/libs/*-SNAPSHOT.jar # (3) jar 빌드 파일을 도커 컨테이너로 복사 COPY ${JAR_FILE} app.jar COPY src/main/resources/prometheus.pem prometheus.pem +COPY start.sh start.sh # (4) pem 파일의 권한 설정 RUN groupadd -r ubuntu && useradd -r -g ubuntu ubuntu \ - && chmod 400 prometheus.pem && chown ubuntu:ubuntu prometheus.pem + && chmod 400 prometheus.pem && chown ubuntu:ubuntu prometheus.pem \ + && chmod +x start.sh # 스크립트에 실행 권한 부여 # (5) jar 파일 실행 -ENTRYPOINT ["java","-jar","/app.jar"] +CMD ["./start.sh"] diff --git a/Server/src/main/resources/application.yml b/Server/src/main/resources/application.yml index 03d601da..0c477db3 100644 --- a/Server/src/main/resources/application.yml +++ b/Server/src/main/resources/application.yml @@ -106,7 +106,7 @@ spring: properties: hibernate: dialect: com.server.global.dialect.CustomMySQL8Dialect - +# open-in-view: false pem: location: /prometheus.pem @@ -118,3 +118,4 @@ decorator: warmup: is-completed: true + diff --git a/Server/start.sh b/Server/start.sh new file mode 100644 index 00000000..d2557538 --- /dev/null +++ b/Server/start.sh @@ -0,0 +1 @@ +exec java $JAVA_OPTS -jar app.jar \ No newline at end of file