mirror of https://github.com/OpenVidu/openvidu.git
Unify JAR location in all openvidu-server Dockerfiles
parent
8e2f096217
commit
cd76c3a74b
|
@ -469,8 +469,8 @@ fi
|
|||
# -------------
|
||||
if [[ "${BUILD_OV_SERVER}" == true ]]; then
|
||||
pushd openvidu-server
|
||||
mvn -B -DskipTests=true package
|
||||
mv target/openvidu-server*.jar /opt/openvidu
|
||||
mvn -B -DskipTests=true clean package
|
||||
mv target/openvidu-server-*.jar /opt/openvidu
|
||||
popd
|
||||
fi
|
||||
|
||||
|
|
|
@ -23,19 +23,19 @@ RUN apt-get update && apt-get install -y \
|
|||
RUN mkdir -p /var/log/supervisor
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
RUN mkdir -p /opt/openvidu
|
||||
|
||||
# Copy OpenVidu Server
|
||||
COPY openvidu-server.jar openvidu-server.jar
|
||||
COPY openvidu-server-*.jar /opt/openvidu
|
||||
|
||||
# Copy KMS entrypoint
|
||||
COPY kms.sh /kms.sh
|
||||
|
||||
# Cleanup
|
||||
RUN rm -rf /var/lib/apt/lists/* && \
|
||||
apt-get autoremove --purge -y && apt-get autoclean
|
||||
|
||||
EXPOSE 8888
|
||||
EXPOSE 9091
|
||||
EXPOSE 4443
|
||||
|
||||
WORKDIR /opt/openvidu
|
||||
|
||||
# Exec supervisord
|
||||
CMD ["/usr/bin/supervisord"]
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
#!/bin/bash
|
||||
VERSION=$1
|
||||
if [[ ! -z $VERSION ]]; then
|
||||
cp ../../target/openvidu-server-*.jar ./openvidu-server.jar
|
||||
|
||||
if [[ ! -f "./openvidu-server-*.jar" ]]; then
|
||||
cp ../../target/openvidu-server-*.jar .
|
||||
fi
|
||||
if [[ ! -f "./openvidu-server-*.jar" ]]; then
|
||||
echo "Error: openvidu-server JAR not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker build --pull --no-cache --rm=true -t openvidu/openvidu-dev:$VERSION .
|
||||
rm ./openvidu-server.jar
|
||||
else
|
||||
|
|
|
@ -9,5 +9,5 @@ command=/bin/bash /kms.sh
|
|||
redirect_stderr=true
|
||||
|
||||
[program:openvidu-server]
|
||||
command=/bin/bash -c "java -jar -Dspring.config.additional-location=classpath:/application-container.properties -DOPENVIDU_DEV=true /openvidu-server.jar"
|
||||
command=/bin/bash -c "java -jar -Dspring.config.additional-location=classpath:/application-container.properties -DOPENVIDU_DEV=true /opt/openvidu/openvidu-server-*.jar"
|
||||
redirect_stderr=true
|
||||
|
|
|
@ -14,9 +14,9 @@ RUN apt-get update && apt-get install -y \
|
|||
dnsutils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir -p /opt/openvidu /usr/local/bin/
|
||||
RUN mkdir -p /opt/openvidu
|
||||
|
||||
COPY openvidu-server-pro-*.jar /opt/openvidu/openvidu-server.jar
|
||||
COPY openvidu-server-pro-*.jar /opt/openvidu
|
||||
COPY ./entrypoint.sh /usr/local/bin
|
||||
COPY ./discover_my_public_ip.sh /usr/local/bin
|
||||
COPY ./coturn-shared-key.template /usr/local
|
||||
|
|
|
@ -8,7 +8,6 @@ export OV_CE_DEBUG_LEVEL="${OV_CE_DEBUG_LEVEL:-}"
|
|||
export JAVA_OPTIONS=${JAVA_OPTIONS:-}
|
||||
export COTURN_IP="${COTURN_IP:-auto-ipv4}"
|
||||
|
||||
|
||||
# Generate Coturn shared secret key, if COTURN_SHARED_SECRET_KEY is not defined
|
||||
if [[ -z "${COTURN_SHARED_SECRET_KEY}" ]]; then
|
||||
|
||||
|
@ -43,8 +42,7 @@ if [ -n "${WAIT_KIBANA_URL}" ]; then
|
|||
printf "\n ======================================="
|
||||
printf "\n"
|
||||
|
||||
until curl --insecure --output /dev/null --silent --head --fail --max-time 10 --connect-timeout 10 "${WAIT_KIBANA_URL}" &> /dev/null
|
||||
do
|
||||
until curl --insecure --output /dev/null --silent --head --fail --max-time 10 --connect-timeout 10 "${WAIT_KIBANA_URL}" &>/dev/null; do
|
||||
printf "\n Waiting for kibana in '%s' 'URL'. This may take some minutes, please be patient..." "${WAIT_KIBANA_URL}"
|
||||
sleep 1
|
||||
done
|
||||
|
@ -75,4 +73,4 @@ fi
|
|||
|
||||
# Here we don't expand variables to be interpreted as separated arguments
|
||||
# shellcheck disable=SC2086
|
||||
java ${JAVA_OPTIONS:-} -jar openvidu-server.jar
|
||||
java ${JAVA_OPTIONS:-} -jar openvidu-server-pro-*.jar
|
||||
|
|
|
@ -9,8 +9,9 @@ RUN apt-get update && apt-get install -y \
|
|||
dnsutils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy OpenVidu Server
|
||||
COPY openvidu-server.jar /
|
||||
RUN mkdir -p /opt/openvidu
|
||||
|
||||
COPY openvidu-server-*.jar /opt/openvidu
|
||||
COPY ./entrypoint.sh /usr/local/bin
|
||||
COPY ./discover_my_public_ip.sh /usr/local/bin
|
||||
COPY ./coturn-shared-key.template /usr/local
|
||||
|
@ -19,4 +20,6 @@ RUN chmod +x /usr/local/bin/entrypoint.sh && \
|
|||
|
||||
EXPOSE 4443
|
||||
|
||||
WORKDIR /opt/openvidu
|
||||
|
||||
CMD /usr/local/bin/entrypoint.sh
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
#!/bin/bash
|
||||
VERSION=$1
|
||||
if [[ ! -z $VERSION ]]; then
|
||||
cp ../../target/openvidu-server-*.jar ./openvidu-server.jar
|
||||
|
||||
if [[ ! -f "./openvidu-server-*.jar" ]]; then
|
||||
cp ../../target/openvidu-server-*.jar .
|
||||
fi
|
||||
if [[ ! -f "./openvidu-server-*.jar" ]]; then
|
||||
echo "Error: openvidu-server JAR not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp ../utils/discover_my_public_ip.sh ./discover_my_public_ip.sh
|
||||
cp ../utils/coturn-shared-key.template ./coturn-shared-key.template
|
||||
|
||||
|
|
|
@ -50,4 +50,4 @@ fi
|
|||
|
||||
# Here we don't expand variables to be interpreted as separated arguments
|
||||
# shellcheck disable=SC2086
|
||||
java ${JAVA_OPTIONS:-} -jar openvidu-server.jar
|
||||
java ${JAVA_OPTIONS:-} -jar openvidu-server-*.jar
|
||||
|
|
Loading…
Reference in New Issue