Update Dockerfile with entrypoint additions

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

View file

@ -67,4 +67,15 @@ EXPOSE 8080
# CMD curl -fsS http://localhost:8080/ || exit 1
# Start the app
ENTRYPOINT ["java", "-jar", "app.jar"]
# ---------- ADDITIONS FOR OPTION 2 LOG FORWARDING ----------
# Copy log-forwarding script into container
COPY forward-logs.sh /app/forward-logs.sh
# Make the script executable
RUN chmod +x /app/forward-logs.sh
# Run both PetClinic and log forwarder in same container
ENTRYPOINT ["bash", "-c", "java -jar app.jar & /app/forward-logs.sh"]