Skip to content

Commit

Permalink
Changes for better performance
Browse files Browse the repository at this point in the history
  • Loading branch information
MateuszRostek committed Mar 21, 2024
1 parent 6e98840 commit cb02607
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
FROM maven:3.9.6-eclipse-temurin-17 as builder
WORKDIR application
COPY src pom.xml checkstyle.xml ./
RUN mvn -X clean package

FROM openjdk:17-jdk-slim
WORKDIR application
COPY --from=builder application/target/application.jar ./
COPY target/application.jar ./
ENTRYPOINT ["java", "-jar","application.jar"]
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: "3.8"
services:
mysqldb:
image: mysql:8.2.0
container_name: book-store-db
restart: unless-stopped
env_file: ./.env
environment:
Expand All @@ -16,7 +17,7 @@ services:
- mysqldb
restart: unless-stopped
build: .
# image: application:latest
container_name: book-store-app
env_file: ./.env
ports:
- $SPRING_LOCAL_PORT:$SPRING_DOCKER_PORT
Expand All @@ -28,4 +29,4 @@ services:
"spring.datasource.password" : "$MYSQLDB_ROOT_PASSWORD",
"spring.jpa.hibernate.ddl-auto" : "validate"
}'
# JAVA_TOOL_OPTIONS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
JAVA_TOOL_OPTIONS: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005"
16 changes: 0 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,6 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<!-- <plugin>-->
<!-- &lt;!&ndash; Build an executable JAR &ndash;&gt;-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-jar-plugin</artifactId>-->
<!-- <version>3.3.0</version>-->
<!-- <configuration>-->
<!-- <archive>-->
<!-- <manifest>-->
<!-- <addClasspath>true</addClasspath>-->
<!-- <classpathPrefix>lib/</classpathPrefix>-->
<!-- <mainClass>book.store.BookStoreApplication</mainClass>-->
<!-- </manifest>-->
<!-- </archive>-->
<!-- </configuration>-->
<!-- </plugin>-->

<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
Expand Down

0 comments on commit cb02607

Please sign in to comment.