replaced everything with ws
This commit is contained in:
@@ -18,10 +18,22 @@ WORKDIR /app
|
||||
# Copy fat jar from build stage
|
||||
COPY --from=build /app/target/*.jar app.jar
|
||||
|
||||
# Copy logback-spring.xml to config directory (can be overridden by volume mount)
|
||||
COPY --from=build /app/src/main/resources/logback-spring.xml /app/config/logback-spring.xml
|
||||
|
||||
# Create log directory
|
||||
RUN mkdir -p /app/logs && chmod 755 /app/logs
|
||||
|
||||
# Expose port (for internal communication with nginx)
|
||||
EXPOSE 8080
|
||||
|
||||
# Default environment variables (can be overridden in docker-compose)
|
||||
ENV JAVA_OPTS=""
|
||||
ENV LOGGING_CONFIG="/app/config/logback-spring.xml"
|
||||
ENV LOG_DIR="/app/logs"
|
||||
|
||||
# Start app with external logback config
|
||||
# Ensure logback-spring.xml exists and is a file (not a directory)
|
||||
ENTRYPOINT ["sh", "-c", "if [ ! -f \"${LOGGING_CONFIG}\" ] || [ -d \"${LOGGING_CONFIG}\" ]; then echo 'Warning: ${LOGGING_CONFIG} not found or is a directory, using default from JAR'; LOGGING_CONFIG=''; fi && java $JAVA_OPTS ${LOGGING_CONFIG:+-Dlogging.config=${LOGGING_CONFIG}} -DLOG_DIR=${LOG_DIR} -jar app.jar"]
|
||||
|
||||
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar app.jar"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user