fix: JAR upload — increase multipart limit and fix storage permissions

Spring Boot defaults to 1MB max file size which rejected all JAR
uploads. Set to 200MB to match the configured max-jar-size. Also
create /data/jars with cameleer user ownership in the Dockerfile
so the non-root process can write uploaded JARs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-04-07 15:10:35 +02:00
parent 8febdba533
commit 1a0f1e07be
2 changed files with 6 additions and 1 deletions

View File

@@ -23,7 +23,8 @@ RUN --mount=type=cache,target=/root/.m2/repository ./mvnw package -DskipTests -B
# Runtime: target platform (amd64)
FROM eclipse-temurin:21-jre-alpine
WORKDIR /app
RUN addgroup -S cameleer && adduser -S cameleer -G cameleer
RUN addgroup -S cameleer && adduser -S cameleer -G cameleer \
&& mkdir -p /data/jars && chown -R cameleer:cameleer /data
COPY --from=build /build/target/*.jar app.jar
USER cameleer
EXPOSE 8080

View File

@@ -5,6 +5,10 @@ server:
spring:
application:
name: cameleer-saas
servlet:
multipart:
max-file-size: 200MB
max-request-size: 200MB
datasource:
url: ${SPRING_DATASOURCE_URL:jdbc:postgresql://postgres:5432/cameleer_saas}
username: ${SPRING_DATASOURCE_USERNAME:cameleer}