Added java options in docker

pull/431/head
OscarSotoSanchez 2020-04-13 14:19:38 +02:00
parent 9f4bfa08d1
commit eaec3033e6
4 changed files with 22 additions and 3 deletions

View File

@ -135,3 +135,10 @@ OPENVIDU_CDR=false
# the verbosity level of the logs of Openvidu Service
# RECOMENDED VALUES: INFO for normal logs DEBUG for more verbose logs
# OV_CE_DEBUG_LEVEL=INFO
# Java Options
# --------------------------
# Uncomment the next line and define this to add
# options to java command
# Documentation: https://docs.oracle.com/cd/E37116_01/install.111210/e23737/configuring_jvm.htm#OUDIG00058
# JAVA_OPTIONS=-Xms2048m -Xmx4096m

View File

@ -12,4 +12,8 @@ if [ ! -z "${WAIT_KIBANA_URL}" ]; then
done
fi
java -jar openvidu-server.jar
if [ ! -z "${JAVA_OPTIONS}" ]; then
echo "Using java options: ${JAVA_OPTIONS}"
fi
java ${JAVA_OPTIONS:-} -jar openvidu-server.jar

View File

@ -9,8 +9,9 @@ RUN apt-get update && apt-get install -y \
# Copy OpenVidu Server
COPY openvidu-server.jar /
COPY ./entrypoint.sh /usr/local/bin
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 4443
# Exec supervisord
CMD ["java", "-jar", "openvidu-server.jar"]
CMD /usr/local/bin/entrypoint.sh

View File

@ -0,0 +1,7 @@
#!/bin/bash
if [ ! -z "${JAVA_OPTIONS}" ]; then
echo "Using java options: ${JAVA_OPTIONS}"
fi
java ${JAVA_OPTIONS:-} -jar openvidu-server.jar