Skip to content

Commit

Permalink
dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
songhaechan committed Oct 28, 2023
1 parent b87f630 commit b136c8a
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 7 deletions.
4 changes: 0 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ services:
spring_app1:
container_name: Spring-Tomcat-1
image: haechansomg/simple-board:was01
environment:
- JAVA_OPTS=-javaagent:/home/ubuntu/scouter/agent.java/scouter-agent-java-2.20.0.jar -Dscouter.config=/home/ubuntu/scouter/agent.java/conf/was01.conf -Dobj_name=WAS-01
ports:
- 8080:8080
spring_app2:
container_name: Spring-Tomcat-2
image: haechansomg/simple-board2:was02
environment:
- JAVA_OPTS=-javaagent:/home/ubuntu/scouter/agent.java/scouter-agent-java-2.20.0.jar -Dscouter.config=/home/ubuntu/scouter/agent.java/conf/was02.conf -Dobj_name=WAS-02
ports:
- 8081:8081
redis:
Expand Down
3 changes: 2 additions & 1 deletion dockerFile-was01
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ FROM openjdk:17-jdk
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} app.jar
COPY scouter/agent.java/scouter-agent-java-2.20.0.jar scouter-agent-java-2.20.0.jar
ENTRYPOINT ["java","-javaagent:scouter-agent-java-2.20.0.jar","-Duser.timezone=Asia/Seoul","-jar","app.jar"]
COPY scouter/agent.java/conf/was01.conf was01.conf
ENTRYPOINT ["java","-javaagent:scouter-agent-java-2.20.0.jar","-Dscouter.config=was01.conf","-Duser.timezone=Asia/Seoul","-jar","app.jar"]
4 changes: 2 additions & 2 deletions dockerFile-was02
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ FROM openjdk:17-jdk
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} app.jar
COPY scouter/agent.java/scouter-agent-java-2.20.0.jar scouter-agent-java-2.20.0.jar

ENTRYPOINT ["java","-javaagent:scouter-agent-java-2.20.0.jar","-Duser.timezone=Asia/Seoul","-jar","app.jar"]
COPY scouter/agent.java/conf/was02.conf was02.conf
ENTRYPOINT ["java","-javaagent:scouter-agent-java-2.20.0.jar","-Dscouter.config=was01.conf","-Duser.timezone=Asia/Seoul","-jar","app.jar"]
12 changes: 12 additions & 0 deletions scouter/agent.java/conf/was01.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### scouter java agent configuration sample
obj_name=WAS-01
net_collector_ip=34.16.187.75
net_collector_udp_port=6100
net_collector_tcp_port=6100
#hook_method_patterns=sample.mybiz.*Biz.*,sample.service.*Service.*
#trace_http_client_ip_header_key=X-Forwarded-For
#profile_spring_controller_method_parameter_enabled=false
#hook_exception_class_patterns=my.exception.TypedException
#profile_fullstack_hooked_exception_enabled=true
#hook_exception_handler_method_patterns=my.AbstractAPIController.fallbackHandler,my.ApiExceptionLoggingFilter.handleNotFoundErrorResponse
#hook_exception_hanlder_exclude_class_patterns=exception.BizException
12 changes: 12 additions & 0 deletions scouter/agent.java/conf/was02.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### scouter java agent configuration sample
obj_name=WAS-02
net_collector_ip=34.16.187.75
net_collector_udp_port=6100
net_collector_tcp_port=6100
#hook_method_patterns=sample.mybiz.*Biz.*,sample.service.*Service.*
#trace_http_client_ip_header_key=X-Forwarded-For
#profile_spring_controller_method_parameter_enabled=false
#hook_exception_class_patterns=my.exception.TypedException
#profile_fullstack_hooked_exception_enabled=true
#hook_exception_handler_method_patterns=my.AbstractAPIController.fallbackHandler,my.ApiExceptionLoggingFilter.handleNotFoundErrorResponse
#hook_exception_hanlder_exclude_class_patterns=exception.BizException

0 comments on commit b136c8a

Please sign in to comment.