deployment: fix nginx main process. Update nginx version

pull/678/head
cruizba 2021-12-16 17:27:32 +01:00
parent ea59ad0519
commit edfbe3104e
2 changed files with 18 additions and 14 deletions

View File

@ -1,4 +1,4 @@
FROM nginx:1.20.0-alpine
FROM nginx:1.21.4-alpine
# Install required software
RUN apk update && \
@ -29,4 +29,4 @@ RUN mkdir -p /var/www/certbot && \
chmod +x /usr/local/bin/entrypoint.sh && \
chmod +x /usr/local/bin/discover_my_public_ip.sh
CMD /usr/local/bin/entrypoint.sh
CMD [ "/usr/local/bin/entrypoint.sh" ]

View File

@ -463,7 +463,11 @@ printf "\n ======================================="
printf "\n = START OPENVIDU PROXY ="
printf "\n ======================================="
printf "\n\n"
nginx -s reload
# nginx logs
tail -f /var/log/nginx/*.log
echo "Restarting nginx"
NGINX_STARTING_PID=$(cat /var/run/nginx.pid)
while kill -s 0 "$NGINX_STARTING_PID" 2> /dev/null; do
nginx -s quit
sleep 10
done
echo "Starting nginx..."
nginx -g "daemon off;"