Image error solve update

This commit is contained in:
2025-10-10 10:04:53 +05:30
parent 7763940b2a
commit 43ed620a0a
3 changed files with 21 additions and 10 deletions

View File

@ -25,15 +25,22 @@ RUN ls -la target/
# =======================
FROM eclipse-temurin:17-jre-focal
# Expose port and set volume
# Expose port
EXPOSE 8080
VOLUME /tmp
# Create app directory
RUN mkdir -p /app
# Create app and uploads directories
RUN mkdir -p /app && \
mkdir -p /app/uploads && \
chmod 755 /app/uploads
# Copy the JAR from builder stage into /app directory
# Set working directory
WORKDIR /app
# Copy the JAR from builder stage
COPY --from=builder /workdir/server/target/*.jar /app/
# Create volume for uploads (optional but recommended)
VOLUME ["/app/uploads"]
# Entry point: dynamically run the first JAR in /app
ENTRYPOINT ["sh", "-c", "java -jar /app/$(ls /app | grep .jar | head -n1)"]
ENTRYPOINT ["sh", "-c", "java -jar /app/$(ls /app | grep .jar | head -n1)"]

View File

@ -46,7 +46,7 @@ spring:
# File upload configuration
file:
upload:
directory: uploads
directory: /app/uploads
app:
base-url: ${APP_BASE_URL:http://localhost:8080}
@ -69,7 +69,7 @@ file:
app:
base-url: https://cmcbackend.rootxwire.com
cors:
allowed-origins: https://maincmc.rootxwire.com,https://cmcbackend.rootxwire.com, https://cmcadminfrontend.rootxwire.com
allowed-origins: https://maincmc.rootxwire.com,https://cmcbackend.rootxwire.com, https://cmcadminfrontend.rootxwire.com/
---
# Development file upload configuration with custom directory