Image error solve update
This commit is contained in:
@ -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)"]
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user