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
|
if [[ "${BUILD_OV_SERVER}" == true ]]; then
|
||||||
pushd openvidu-server
|
pushd openvidu-server
|
||||||
mvn -B -DskipTests=true package
|
mvn -B -DskipTests=true clean package
|
||||||
mv target/openvidu-server*.jar /opt/openvidu
|
mv target/openvidu-server-*.jar /opt/openvidu
|
||||||
popd
|
popd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -23,19 +23,19 @@ RUN apt-get update && apt-get install -y \
|
||||||
RUN mkdir -p /var/log/supervisor
|
RUN mkdir -p /var/log/supervisor
|
||||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
|
RUN mkdir -p /opt/openvidu
|
||||||
|
|
||||||
# Copy OpenVidu Server
|
# Copy OpenVidu Server
|
||||||
COPY openvidu-server.jar openvidu-server.jar
|
COPY openvidu-server-*.jar /opt/openvidu
|
||||||
|
|
||||||
# Copy KMS entrypoint
|
# Copy KMS entrypoint
|
||||||
COPY kms.sh /kms.sh
|
COPY kms.sh /kms.sh
|
||||||
|
|
||||||
# Cleanup
|
|
||||||
RUN rm -rf /var/lib/apt/lists/* && \
|
|
||||||
apt-get autoremove --purge -y && apt-get autoclean
|
|
||||||
|
|
||||||
EXPOSE 8888
|
EXPOSE 8888
|
||||||
EXPOSE 9091
|
EXPOSE 9091
|
||||||
EXPOSE 4443
|
EXPOSE 4443
|
||||||
|
|
||||||
|
WORKDIR /opt/openvidu
|
||||||
|
|
||||||
# Exec supervisord
|
# Exec supervisord
|
||||||
CMD ["/usr/bin/supervisord"]
|
CMD ["/usr/bin/supervisord"]
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
VERSION=$1
|
VERSION=$1
|
||||||
if [[ ! -z $VERSION ]]; then
|
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 .
|
docker build --pull --no-cache --rm=true -t openvidu/openvidu-dev:$VERSION .
|
||||||
rm ./openvidu-server.jar
|
rm ./openvidu-server.jar
|
||||||
else
|
else
|
||||||
|
|
|
@ -9,5 +9,5 @@ command=/bin/bash /kms.sh
|
||||||
redirect_stderr=true
|
redirect_stderr=true
|
||||||
|
|
||||||
[program:openvidu-server]
|
[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
|
redirect_stderr=true
|
||||||
|
|
|
@ -14,9 +14,9 @@ RUN apt-get update && apt-get install -y \
|
||||||
dnsutils \
|
dnsutils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& 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 ./entrypoint.sh /usr/local/bin
|
||||||
COPY ./discover_my_public_ip.sh /usr/local/bin
|
COPY ./discover_my_public_ip.sh /usr/local/bin
|
||||||
COPY ./coturn-shared-key.template /usr/local
|
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 JAVA_OPTIONS=${JAVA_OPTIONS:-}
|
||||||
export COTURN_IP="${COTURN_IP:-auto-ipv4}"
|
export COTURN_IP="${COTURN_IP:-auto-ipv4}"
|
||||||
|
|
||||||
|
|
||||||
# Generate Coturn shared secret key, if COTURN_SHARED_SECRET_KEY is not defined
|
# Generate Coturn shared secret key, if COTURN_SHARED_SECRET_KEY is not defined
|
||||||
if [[ -z "${COTURN_SHARED_SECRET_KEY}" ]]; then
|
if [[ -z "${COTURN_SHARED_SECRET_KEY}" ]]; then
|
||||||
|
|
||||||
|
@ -22,7 +21,7 @@ if [[ -z "${COTURN_SHARED_SECRET_KEY}" ]]; then
|
||||||
|
|
||||||
# Replace value and generate shared-secret-key file
|
# Replace value and generate shared-secret-key file
|
||||||
sed "s|{{COTURN_SHARED_SECRET_KEY}}|${RANDOM_COTURN_SECRET}|g" \
|
sed "s|{{COTURN_SHARED_SECRET_KEY}}|${RANDOM_COTURN_SECRET}|g" \
|
||||||
/usr/local/coturn-shared-key.template > /run/secrets/coturn/shared-secret-key
|
/usr/local/coturn-shared-key.template >/run/secrets/coturn/shared-secret-key
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Read value
|
# Read value
|
||||||
|
@ -43,8 +42,7 @@ if [ -n "${WAIT_KIBANA_URL}" ]; then
|
||||||
printf "\n ======================================="
|
printf "\n ======================================="
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
|
||||||
until curl --insecure --output /dev/null --silent --head --fail --max-time 10 --connect-timeout 10 "${WAIT_KIBANA_URL}" &> /dev/null
|
until curl --insecure --output /dev/null --silent --head --fail --max-time 10 --connect-timeout 10 "${WAIT_KIBANA_URL}" &>/dev/null; do
|
||||||
do
|
|
||||||
printf "\n Waiting for kibana in '%s' 'URL'. This may take some minutes, please be patient..." "${WAIT_KIBANA_URL}"
|
printf "\n Waiting for kibana in '%s' 'URL'. This may take some minutes, please be patient..." "${WAIT_KIBANA_URL}"
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
@ -75,4 +73,4 @@ fi
|
||||||
|
|
||||||
# Here we don't expand variables to be interpreted as separated arguments
|
# Here we don't expand variables to be interpreted as separated arguments
|
||||||
# shellcheck disable=SC2086
|
# 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 \
|
dnsutils \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copy OpenVidu Server
|
RUN mkdir -p /opt/openvidu
|
||||||
COPY openvidu-server.jar /
|
|
||||||
|
COPY openvidu-server-*.jar /opt/openvidu
|
||||||
COPY ./entrypoint.sh /usr/local/bin
|
COPY ./entrypoint.sh /usr/local/bin
|
||||||
COPY ./discover_my_public_ip.sh /usr/local/bin
|
COPY ./discover_my_public_ip.sh /usr/local/bin
|
||||||
COPY ./coturn-shared-key.template /usr/local
|
COPY ./coturn-shared-key.template /usr/local
|
||||||
|
@ -19,4 +20,6 @@ RUN chmod +x /usr/local/bin/entrypoint.sh && \
|
||||||
|
|
||||||
EXPOSE 4443
|
EXPOSE 4443
|
||||||
|
|
||||||
|
WORKDIR /opt/openvidu
|
||||||
|
|
||||||
CMD /usr/local/bin/entrypoint.sh
|
CMD /usr/local/bin/entrypoint.sh
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
VERSION=$1
|
VERSION=$1
|
||||||
if [[ ! -z $VERSION ]]; then
|
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/discover_my_public_ip.sh ./discover_my_public_ip.sh
|
||||||
cp ../utils/coturn-shared-key.template ./coturn-shared-key.template
|
cp ../utils/coturn-shared-key.template ./coturn-shared-key.template
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ if [[ -z "${COTURN_SHARED_SECRET_KEY}" ]]; then
|
||||||
|
|
||||||
# Replace value and generate shared-secret-key file
|
# Replace value and generate shared-secret-key file
|
||||||
sed "s|{{COTURN_SHARED_SECRET_KEY}}|${RANDOM_COTURN_SECRET}|g" \
|
sed "s|{{COTURN_SHARED_SECRET_KEY}}|${RANDOM_COTURN_SECRET}|g" \
|
||||||
/usr/local/coturn-shared-key.template > /run/secrets/coturn/shared-secret-key
|
/usr/local/coturn-shared-key.template >/run/secrets/coturn/shared-secret-key
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Read value
|
# Read value
|
||||||
|
@ -50,4 +50,4 @@ fi
|
||||||
|
|
||||||
# Here we don't expand variables to be interpreted as separated arguments
|
# Here we don't expand variables to be interpreted as separated arguments
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
java ${JAVA_OPTIONS:-} -jar openvidu-server.jar
|
java ${JAVA_OPTIONS:-} -jar openvidu-server-*.jar
|
||||||
|
|
Loading…
Reference in New Issue