X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=support%2Fdocker%2Fproduction%2Fentrypoint.nginx.sh;h=ad26aa0e290ce665587d23cf30022302dec860b8;hb=cb4bab61c19f2be7858f9cc6e8e234f04b1d504f;hp=9038069363301f81160806c5f3226a9a3b711b1a;hpb=e604efcb71ca3bbff701598969d055d688161985;p=github%2FChocobozzz%2FPeerTube.git diff --git a/support/docker/production/entrypoint.nginx.sh b/support/docker/production/entrypoint.nginx.sh index 903806936..ad26aa0e2 100644 --- a/support/docker/production/entrypoint.nginx.sh +++ b/support/docker/production/entrypoint.nginx.sh @@ -1,15 +1,17 @@ #!/bin/sh set -e -# Process nginx template -SOURCE="/etc/nginx/conf.d/peertube.template" -TARGET="/etc/nginx/conf.d/default.conf" -export WEBSERVER_HOST="default_server" +# Process the nginx template +SOURCE_FILE="/etc/nginx/conf.d/peertube.template" +TARGET_FILE="/etc/nginx/conf.d/default.conf" +export WEBSERVER_HOST="$PEERTUBE_WEBSERVER_HOSTNAME" export PEERTUBE_HOST="peertube:9000" -envsubst '${WEBSERVER_HOST} ${PEERTUBE_HOST}' < $SOURCE > $TARGET +envsubst '${WEBSERVER_HOST} ${PEERTUBE_HOST}' < $SOURCE_FILE > $TARGET_FILE -# Remove HTTPS/SSL from nginx conf -sed -i 's/443 ssl http2/80/g;/ssl_/d' $TARGET +while :; do + sleep 12h & wait $!; + nginx -s reload; +done & -nginx -g "daemon off;" \ No newline at end of file +nginx -g 'daemon off;'