Skip to content

Commit

Permalink
Merge pull request #40 from rishiraj88/develop
Browse files Browse the repository at this point in the history
Update Dockerfile and docker-compose.yml for Product.
  • Loading branch information
rishiraj88 authored Feb 6, 2025
2 parents ccf7f5f + fd06348 commit 35e28da
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 44 deletions.
24 changes: 24 additions & 0 deletions product/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Build
# /~https://github.com/carlossg/docker-maven/blob/8cfe24baffa5b250f7bb2d31ce233fc28f3c4f20/amazoncorretto-21/Dockerfile
FROM maven:3.9.9-amazoncorretto-21-alpine AS build
WORKDIR /app
COPY ./src .
COPY ./pom.xml .
RUN mvn clean package

# Deploy
FROM amazoncorretto:8-alpine3.21-jre AS deploy
WORKDIR /app
RUN mkdir target

LABEL maintainer="Rishi Raj"
LABEL version="1.0"
LABEL description="Dockerfile for Order-Manager::Product with JDK 21 and MongoDB"

COPY --from=build /app/target/product-0.0.1-SNAPSHOT.jar /app/target/
EXPOSE 8080
#ENTRYPOINT [ "java", "-jar","target/product-0.0.1-SNAPSHOT.jar" ]
CMD [ "java", "-jar","target/product-0.0.1-SNAPSHOT.jar" ]


VOLUME ./data:/data/db
44 changes: 0 additions & 44 deletions product/Dockerfile-temp

This file was deleted.

1 change: 1 addition & 0 deletions product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<description>product module for order management APIs, built with Spring Boot</description>
<properties>
<java.version>21</java.version>
<spring-boot.repackage.skip>true</spring-boot.repackage.skip>
</properties>
<dependencies>
<dependency>
Expand Down

0 comments on commit 35e28da

Please sign in to comment.