diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index a0e24e3..0000000 --- a/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM openjdk:17-jdk - -WORKDIR /app -ARG JAR_FILE=/build/libs/*.jar -COPY ${JAR_FILE} /app/app.jar -#ARG SCOUTER=/scouter/agent.java -#COPY ${SCOUTER} /app/scouter/agent.java -#"-javaagent:scouter/agent.java/scouter.agent.jar" -#"-Dscouter.config=scouter/agent.java/scouter.agent.jar/conf/scouter.conf" -ENTRYPOINT ["java","-jar","-Duser.timezone=Asia/Seoul","app.jar"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 4afec22..c133837 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,11 +3,17 @@ services: spring_app1: container_name: Spring-Tomcat-1 image: haechansomg/simple-board + build: + context: . + dockerfile: dockerFile-was01 ports: - 8080:8080 spring_app2: container_name: Spring-Tomcat-2 image: haechansomg/simple-board + build: + context: . + dockerfile: dockerFile-was01 ports: - 8081:8081 redis: diff --git a/dockerFile-was01 b/dockerFile-was01 new file mode 100644 index 0000000..32803bd --- /dev/null +++ b/dockerFile-was01 @@ -0,0 +1,5 @@ +FROM openjdk:17-jdk + +ARG JAR_FILE=build/libs/*.jar +COPY ${JAR_FILE} app.jar +ENTRYPOINT ["java","-javaagent:/home/ubuntu/scouter/agent.java/scouter.agent.jar","-Dscouter.config=/home/ubuntu/scouter/agent.java/conf/was01.conf","-Dobj_name=WAS-01","-Duser.timezone=Asia/Seoul","-jar","app.jar"] diff --git a/dockerFile-was02 b/dockerFile-was02 new file mode 100644 index 0000000..4458407 --- /dev/null +++ b/dockerFile-was02 @@ -0,0 +1,5 @@ +FROM openjdk:17-jdk + +ARG JAR_FILE=build/libs/*.jar +COPY ${JAR_FILE} app.jar +ENTRYPOINT ["java","-javaagent:/home/ubuntu/scouter/agent.java/scouter.agent.jar","-Dscouter.config=/home/ubuntu/scouter/agent.java/conf/was02.conf","-Dobj_name=WAS-02","-Duser.timezone=Asia/Seoul","-jar","app.jar"]