Skip to content

Commit 14e5178

Browse files
committed
Add Dockerfile
1 parent ef42fa8 commit 14e5178

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM openjdk:17-jdk-alpine
2+
VOLUME /tmp
3+
COPY target/*.jar app.jar
4+
ENTRYPOINT ["java","-jar","/app.jar"]

pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
</parent>
1212
<groupId>com.todos</groupId>
1313
<artifactId>todos-demo</artifactId>
14-
<version>0.0.1-SNAPSHOT</version>
14+
<version>0.0.1</version>
1515
<name>todos-demo</name>
1616
<description>Spring Boot Mongo DB REST API Example</description>
1717
<properties>
18-
<java.version>21</java.version>
18+
<java.version>17</java.version>
1919
</properties>
2020
<dependencies>
2121

src/main/resources/application-example.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
# Make a copy of this file and rename it to application.properties and specify necessary values like credentials
33
#
44
# NEVER COMMIT application.properties!
5-
spring.data.mongodb.uri=mongodb://<username>:<password>@127.0.0.1:27017/
5+
spring.data.mongodb.uri=mongodb://<username>:<password>@host.docker.internal:27017/
66
spring.data.mongodb.database=todos

0 commit comments

Comments
 (0)