Update Dockerfile with log forwarder

Signed-off-by: lii5a <liisa.tallinn@gmail.com>
This commit is contained in:
lii5a 2026-02-05 11:55:06 +02:00 committed by GitHub
parent 9ab6c941f8
commit 51a53691da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,6 +52,13 @@ ENV OTEL_LOGS_EXPORTER=none
# JVM options: attach the OTel Java agent
ENV JAVA_TOOL_OPTIONS="-javaagent:/otel/otel-agent.jar"
# Copy log forwarder
COPY forward-logs.sh /app/forward-logs.sh
RUN chmod +x /app/forward-logs.sh
# Run PetClinic and log forwarder in same container
ENTRYPOINT ["bash", "-c", "java -jar app.jar & /app/forward-logs.sh"]
# Expose PetClinic default port (usually 8080)
EXPOSE 8080