ニジカ投稿局 https://tv.nizika.tv
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

entrypoint.nginx.sh 395 B

1234567891011121314151617
  1. #!/bin/sh
  2. set -e
  3. # Process the nginx template
  4. SOURCE_FILE="/etc/nginx/conf.d/peertube.template"
  5. TARGET_FILE="/etc/nginx/conf.d/default.conf"
  6. export WEBSERVER_HOST="$PEERTUBE_WEBSERVER_HOSTNAME"
  7. export PEERTUBE_HOST="peertube:9000"
  8. envsubst '${WEBSERVER_HOST} ${PEERTUBE_HOST}' < $SOURCE_FILE > $TARGET_FILE
  9. while :; do
  10. sleep 12h & wait $!;
  11. nginx -s reload;
  12. done &
  13. nginx -g 'daemon off;'