Skip to content

Commit 200a1c0

Browse files
committed
Remove port exposure and health check from Dockerfile and add it to the example docker compose
* The port inside the container is defined via application.properties and not fix.
1 parent 6a5c175 commit 200a1c0

3 files changed

Lines changed: 4 additions & 7 deletions

File tree

event-logs-dedup/Dockerfile

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,4 @@ USER appuser
2626
# JVM options
2727
ENV JAVA_OPTS="-Xms1g -Xmx2g"
2828

29-
# Health check
30-
HEALTHCHECK --interval=5s --timeout=3s --start-period=30s --retries=3 \
31-
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/actuator/health || exit 1
32-
33-
EXPOSE 8080
34-
3529
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar app.jar"]

event-logs-dedup/docker-compose.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,7 @@ services:
1414
- "8080:8080"
1515
volumes:
1616
- ./data:/var/kafka-streams
17+
healthcheck:
18+
test: [ "CMD", "wget", "--no-verbose", "--spider", "--tries=1", "http://localhost:8080/health" ]
19+
timeout: 3s
1720
restart: no

event-logs-dedup/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<artifactId>jackson-databind</artifactId>
6565
</dependency>
6666

67-
<!-- Lombok (optional, for cleaner code) -->
67+
<!-- Lombok -->
6868
<dependency>
6969
<groupId>org.projectlombok</groupId>
7070
<artifactId>lombok</artifactId>

0 commit comments

Comments
 (0)