# Runtime image only — build the jar first: ./mvnw -pl patbond-creation -am package
# Stateless by design (ADR-007): no local state, config via env / mounted files.
# Job state lives in postgres; the worker is crash-safe through the DB lease,
# so any replica may be restarted without losing in-flight work (ADR-023 §3).
FROM eclipse-temurin:17-jre
RUN useradd --system --uid 10001 patbond
USER patbond
WORKDIR /app
COPY target/patbond-creation-1.0.0-SNAPSHOT-exec.jar app.jar
EXPOSE 8085
ENTRYPOINT ["java", "-jar", "/app/app.jar"]
