FROM eclipse-temurin:17-jre-alpine

WORKDIR /app

RUN mkdir -p /app/uploads /app/logs && \
    chown -R 1000:1000 /app/uploads /app/logs && \
    chmod -R 755 /app/uploads /app/logs

COPY demo.jar app.jar
COPY application.yml .

USER 1000

ENTRYPOINT ["java", "-jar", "app.jar"]