diff --git a/Makefile b/Makefile index c1df054..84d140d 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ build: cd api && ./gradlew clean build test: build - docker-comopse -f docker-compose-local.yml up --build + docker-compose -f docker-compose-local.yml up --build deploy: build docker-compose -f docker-compose-prod.yml up --build diff --git a/api/Dockerfile b/api/Dockerfile index 0e3fe83..7fd21d9 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -6,5 +6,16 @@ FROM openjdk:21-jdk-slim # JAR 파일을 /app 디렉토리에 복사합니다. COPY build/libs/*.jar /app/myapp.jar +# JMX 및 RMI 관련 환경 변수 설정 +ENV JAVA_OPTS="-Dcom.sun.management.jmxremote \ + -Dcom.sun.management.jmxremote.port=9010 \ + -Dcom.sun.management.jmxremote.rmi.port=9010 \ + -Dcom.sun.management.jmxremote.authenticate=false \ + -Dcom.sun.management.jmxremote.ssl=false \ + -Djava.rmi.server.hostname=0.0.0.0 \ + -Dcom.sun.management.jmxremote.local.only=false \ + -Djava.rmi.server.port=1099 \ + -Xms512m -Xmx512m" + # 애플리케이션을 실행합니다. -ENTRYPOINT ["java", "-jar", "/app/myapp.jar"] \ No newline at end of file +ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar /app/myapp.jar"] \ No newline at end of file diff --git a/docker-compose-kibana.yml b/docker-compose-kibana.yml deleted file mode 100644 index 80ef1af..0000000 --- a/docker-compose-kibana.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: '3.8' - -services: - kibana: - image: docker.elastic.co/kibana/kibana:7.15.0 - container_name: kibana - depends_on: - - elasticsearch - environment: - - ELASTICSEARCH_HOSTS=http://elasticsearch:9200 - ports: - - "5601:5601" \ No newline at end of file diff --git a/docker-compose-local.yml b/docker-compose-local.yml index 6741d66..81e5bcb 100644 --- a/docker-compose-local.yml +++ b/docker-compose-local.yml @@ -35,6 +35,8 @@ services: build: api ports: - "8081:8081" + - "9010:9010" + - "1099:1099" # web: # build: ./web