FROM eclipse-temurin:21-jre-jammy

WORKDIR /app

RUN apt-get update \
    && apt-get install -y --no-install-recommends fontconfig fonts-wqy-microhei \
    && rm -rf /var/lib/apt/lists/*

COPY backend/ruoyi-admin.jar /app/ruoyi-admin.jar

RUN mkdir -p /app/data/ruoyi /app/logs

EXPOSE 8080

ENTRYPOINT ["sh", "-c", "java ${JAVA_OPTS} -jar /app/ruoyi-admin.jar"]
